Skip to content

chore(spanner): remove deprecated OTel GCP resource detector dependency#13843

Merged
surbhigarg92 merged 2 commits into
mainfrom
spanner_remove_detector_dep
Jul 21, 2026
Merged

chore(spanner): remove deprecated OTel GCP resource detector dependency#13843
surbhigarg92 merged 2 commits into
mainfrom
spanner_remove_detector_dep

Conversation

@surbhigarg92

Copy link
Copy Markdown
Contributor

No description provided.

@surbhigarg92
surbhigarg92 requested review from a team as code owners July 21, 2026 06:51

@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 replaces the dependency on com.google.cloud.opentelemetry:detector-resources-support with io.opentelemetry.contrib:opentelemetry-gcp-resources in pom.xml. Consequently, BuiltInMetricsProvider.java has been updated to use GCPResourceProvider instead of GCPPlatformDetector to detect the client's GCP location, retrieving attributes like cloud.region and cloud.availability_zone instead of the older custom keys. There are no review comments, and I have no additional feedback to provide.

@surbhigarg92
surbhigarg92 force-pushed the spanner_remove_detector_dep branch 2 times, most recently from f368e48 to 65c2ed6 Compare July 21, 2026 11:24
@surbhigarg92
surbhigarg92 force-pushed the spanner_remove_detector_dep branch from 65c2ed6 to 934716d Compare July 21, 2026 11:43
<artifactId>opentelemetry-sdk-metrics</artifactId>
</dependency>
<dependency>
<groupId>com.google.cloud.opentelemetry</groupId>

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.

How do you know this is deprecated? The deprecation notice from README?

cc: @mutianf We may want to remove it from Bigtable as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this was highlighted from Otel team.
cc: @psx95

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.

Yes, it is preferred to remove dependency from this exporter. The recommendation is to move to the standard OpenTelemetry OTLP exporters.

@surbhigarg92
surbhigarg92 merged commit 8baace5 into main Jul 21, 2026
210 checks passed
@surbhigarg92
surbhigarg92 deleted the spanner_remove_detector_dep branch July 21, 2026 17:06
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.

4 participants