Skip to content

Conversation

@vroldanbet
Copy link
Contributor

recent changes mean client-side spanner metrics
are no longer exposed the prometheus scrape endpoint.

The SDK has deprecated OpenCensus support, which was wired into the prometheus endpoint, in favour of OpenTelemetry. This was reflected in a recent SpiceDB change, which made the otel approach the default, and as a consequence all prometheus metrics disappeared.

This commit adds the prometheus exporter as a OpenTelemetry MetricsResolver, to add some the metrics back. The naming convention has changed, and I'm not aware of a way around that.

Also client-side latency metrics are not supported via the opentelemetry integration. See https://cloud.google.com/spanner/docs/capture-custom-metrics-opentelemetry#capture-client-round-trip-latency Instead they now have to be manually instrumented.

@github-actions github-actions bot added area/datastore Affects the storage system area/dependencies Affects dependencies labels Apr 15, 2025
@vroldanbet vroldanbet force-pushed the spanner-metrics-regression branch from 3c7cba0 to 8e8dc92 Compare April 15, 2025 15:45
recent changes mean client-side spanner metrics
are no longer exposed the prometheus scrape endpoint.

The SDK has deprecated OpenCensus support, which was
wired into the prometheus endpoint, in favour of OpenTelemetry.
This was reflected in a recent SpiceDB change, which made the otel
approach the default, and as a consequence all prometheus metrics
disappeared.

This commit adds the prometheus exporter as a OpenTelemetry MetricsResolver,
to add some the metrics back. The naming convention has changed, and I'm not aware
of a way around that.

Also client-side latency metrics are not supported via the opentelemetry integration.
See https://cloud.google.com/spanner/docs/capture-custom-metrics-opentelemetry#capture-client-round-trip-latency
Instead they now have to be manually instrumented.
@tstirrat15 tstirrat15 force-pushed the spanner-metrics-regression branch from 8e8dc92 to 5af1197 Compare November 21, 2025 17:16
@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

❌ Patch coverage is 16.12903% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.94%. Comparing base (b55a9f6) to head (5af1197).

Files with missing lines Patch % Lines
internal/datastore/spanner/spanner.go 16.13% 25 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2329      +/-   ##
==========================================
- Coverage   77.01%   76.94%   -0.06%     
==========================================
  Files         462      462              
  Lines       49121    49142      +21     
==========================================
- Hits        37825    37808      -17     
- Misses       8509     8544      +35     
- Partials     2787     2790       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/datastore Affects the storage system area/dependencies Affects dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants