GeezerVison is showing github.com — fix(datastore): disable built-in OpenTelemetry SDK when metrics export is disabled by lqiu96 · Pull Request #13543 · googleapis/google-cloud-java
Conversation
lqiu96
commented
Jun 23, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
gemini-code-assist[bot] reacted with eyes emoji
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates BuiltInDatastoreMetricsProvider to return a no-op OpenTelemetry instance when built-in metrics export is disabled, preventing unnecessary initialization and potential log spam. Feedback was provided on the test assertion in BuiltInDatastoreMetricsProviderTest.java, suggesting to use isSameInstanceAs(OpenTelemetry.noop()) instead of comparing classes, which is more robust and avoids relying on internal implementation details.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…/cloud/datastore/telemetry/BuiltInDatastoreMetricsProviderTest.java
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Address comments regarding:
- Removing @nullable from createOpenTelemetry
- Avoiding wrapping no-op OpenTelemetry in DatastoreMetricsRecorder
- Using isSameInstanceAs in tests
TAG=agy
CONV=5a246380-6d14-49d4-b850-ec05f8f89bcb
Uh oh!
There was an error while loading. Please reload this page.
lqiu96
added a commit
that referenced
this pull request
Jun 30, 2026
…t is disabled (#13543)
Fixes: #13469
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This was referenced Jul 1, 2026
Reviewers
+1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.