Skip to content

chore(Spanner)!: upgrade OpenTelemetry to v2 - #9329

Open
alkatrivedi wants to merge 2 commits into
mainfrom
support-otel-major-version
Open

alkatrivedi wants to merge 2 commits into
mainfrom
support-otel-major-version

Conversation

@alkatrivedi

@alkatrivedi alkatrivedi commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

This PR introduce OpenTelemetry SDK upgraded to v2
@google-cloud/spanner now 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-util removed (deprecated upstream; the single interface used, MonitoredResource, is now declared internally)
  • @opentelemetry/resource-detector-gcp ^0.57.0 added

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 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.

Comment thread handwritten/spanner/src/metrics/constants.ts Outdated
Comment thread handwritten/spanner/src/metrics/constants.ts
@alkatrivedi
alkatrivedi force-pushed the support-otel-major-version branch from a2ba841 to 936f2e9 Compare September 15, 2026 06:07
@alkatrivedi alkatrivedi changed the title chore(Spanner)\!: upgrade OpenTelemetry to v2 chore(Spanner)!: upgrade OpenTelemetry to v2 Sep 15, 2026
@alkatrivedi
alkatrivedi force-pushed the support-otel-major-version branch 2 times, most recently from c4c35bc to 3c95b8b Compare September 16, 2026 07:09
@alkatrivedi
alkatrivedi marked this pull request as ready for review September 16, 2026 07:35
@alkatrivedi
alkatrivedi requested a review from a team as a code owner September 16, 2026 07:35
@github-actions
github-actions Bot requested a review from feywind September 16, 2026 07:35
@alkatrivedi
alkatrivedi force-pushed the support-otel-major-version branch 3 times, most recently from 52eb641 to 6078171 Compare September 16, 2026 09:35
@alkatrivedi
alkatrivedi requested a review from a team as a code owner September 16, 2026 10:35
@alkatrivedi
alkatrivedi force-pushed the support-otel-major-version branch from 6aaa1db to 2541e62 Compare September 16, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant