Skip to content

Commit 17f16bf

Browse files
authored
fix(google-cloud-spanner): Add credential check for built-in metrics enabling (#13038)
1 parent 2f5481a commit 17f16bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

java-spanner/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2729,7 +2729,7 @@ public void enablegRPCMetrics(
27292729
// records each instrument once per GrpcOpenTelemetry instance, so wiring two instances onto one
27302730
// channel does not double-count attempt/operation metrics (verified by
27312731
// GrpcMetricsDualWireTest).
2732-
if (isEnableBuiltInMetrics()) {
2732+
if (isEnableBuiltInMetrics() && !usesNoCredentials()) {
27332733
this.builtInMetricsProvider.enableGrpcMetrics(
27342734
channelProviderBuilder,
27352735
this.getProjectId(),

0 commit comments

Comments
 (0)