Skip to content

Commit 88c6386

Browse files
committed
fix: disable afe_connectivity_error_count metric
1 parent 13bfa7c commit 88c6386

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

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)