chore(Spanner)!: upgrade OpenTelemetry to v2 - #9329
Open
alkatrivedi wants to merge 2 commits into
Open
alkatrivedi wants to merge 2 commits into
alkatrivedi wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request upgrades OpenTelemetry dependencies to v2, removes the deprecated @google-cloud/opentelemetry-resource-util package in favor of @opentelemetry/resource-detector-gcp, and migrates Resource instantiations to resourceFromAttributes. However, the changes to metric views in constants.ts incorrectly use plain ViewOptions instead of instantiating View classes, which will cause runtime or compilation errors. The feedback correctly advises importing Aggregation and View and instantiating the views properly using Aggregation.ExplicitBucketHistogram.
alkatrivedi
force-pushed
the
support-otel-major-version
branch
from
September 15, 2026 06:07
a2ba841 to
936f2e9
Compare
alkatrivedi
force-pushed
the
support-otel-major-version
branch
2 times, most recently
from
September 16, 2026 07:09
c4c35bc to
3c95b8b
Compare
alkatrivedi
marked this pull request as ready for review
September 16, 2026 07:35
alkatrivedi
force-pushed
the
support-otel-major-version
branch
3 times, most recently
from
September 16, 2026 09:35
52eb641 to
6078171
Compare
alkatrivedi
force-pushed
the
support-otel-major-version
branch
from
September 16, 2026 19:27
6aaa1db to
2541e62
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR introduce OpenTelemetry SDK upgraded to v2
@google-cloud/spannernow depends on the OpenTelemetry JS v2 SDK:@opentelemetry/sdk-metrics^1.30.1 → ^2.11.0@opentelemetry/resources^1.8.0 → ^2.11.0@google-cloud/opentelemetry-resource-utilremoved (deprecated upstream; the single interface used, MonitoredResource, is now declared internally)@opentelemetry/resource-detector-gcp^0.57.0 added