Skip to content

Commit f89c1c0

Browse files
fix: disable afe_connectivity_error_count metric (#4041)
* fix: disable afe_connectivity_error_count metric * chore: generate libraries at Thu Sep 11 14:04:02 UTC 2025 --------- Co-authored-by: cloud-java-bot <[email protected]>
1 parent f15e9df commit f89c1c0

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If you are using Maven without the BOM, add this to your dependencies:
4141
<dependency>
4242
<groupId>com.google.cloud</groupId>
4343
<artifactId>google-cloud-spanner</artifactId>
44-
<version>6.93.0</version>
44+
<version>6.99.0</version>
4545
</dependency>
4646

4747
```

google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/HeaderInterceptor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ private void processHeader(
189189
float afeLatency = serverTimingMetrics.get(AFE_TIMING_HEADER);
190190
compositeTracer.recordAFELatency(afeLatency);
191191
} else {
192-
compositeTracer.recordAfeHeaderMissingCount(1L);
192+
// Disable afe_connectivity_error_count metric as AFE header is disabled in backend
193+
// currently.
194+
// compositeTracer.recordAfeHeaderMissingCount(1L);
193195
}
194196
}
195197
} catch (NumberFormatException e) {

google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetryBuiltInMetricsTracerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,9 @@ public void testNoServerTimingHeader() throws IOException, InterruptedException
390390

391391
assertFalse(checkIfMetricExists(metricReader, BuiltInMetricsConstant.AFE_LATENCIES_NAME));
392392
assertFalse(checkIfMetricExists(metricReader, BuiltInMetricsConstant.GFE_LATENCIES_NAME));
393-
MetricData afeConnectivityMetricData =
394-
getMetricData(metricReader, BuiltInMetricsConstant.AFE_CONNECTIVITY_ERROR_NAME);
395-
assertThat(getAggregatedValue(afeConnectivityMetricData, expectedAttributes)).isEqualTo(1);
393+
// Metric is disabled currently
394+
assertFalse(
395+
checkIfMetricExists(metricReader, BuiltInMetricsConstant.AFE_CONNECTIVITY_ERROR_NAME));
396396

397397
spannerNoHeader.close();
398398
serverNoHeader.shutdown();

0 commit comments

Comments
 (0)