Skip to content

chore(spanner): configure built-in metrics reader - #6242

Open
olavloite wants to merge 1 commit into
googleapis:mainfrom
olavloite:spanner-configure-periodic-reader
Open

chore(spanner): configure built-in metrics reader#6242
olavloite wants to merge 1 commit into
googleapis:mainfrom
olavloite:spanner-configure-periodic-reader

Conversation

@olavloite

Copy link
Copy Markdown
Contributor
  • Configure the built-in metrics reader to export once every 60s
  • Set up bucket boundaries
  • Disable built-in metrics when connected to the emulator
  • Harden the parsing of server timings

- Configure the built-in metrics reader to export once every 60s
- Set up bucket boundaries
- Disable built-in metrics when connected to the emulator
- Harden the parsing of server timings
@olavloite
olavloite requested review from a team as code owners July 31, 2026 08:25
@product-auto-label product-auto-label Bot added the api: spanner Issues related to the Spanner API. label Jul 31, 2026

@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 enhances the Spanner observability and metrics module by adding support to disable metrics when using the emulator, defining custom bucket boundaries for latency histograms, and setting a default 60-second export interval. It also refactors server timing parsing for better validation and adds comprehensive unit tests to verify these changes. I have no feedback to provide.

@olavloite
olavloite requested a review from sakthivelmanii July 31, 2026 08:30
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.78049% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.10%. Comparing base (57dae51) to head (4d8c2f0).

Files with missing lines Patch % Lines
src/spanner/src/observability/exporter.rs 66.66% 1 Missing ⚠️
src/spanner/src/observability/metrics.rs 99.37% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6242      +/-   ##
==========================================
+ Coverage   96.05%   96.10%   +0.04%     
==========================================
  Files         271      271              
  Lines       68537    68681     +144     
==========================================
+ Hits        65835    66004     +169     
+ Misses       2702     2677      -25     

☔ View full report in Codecov by Harness.
📢 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.

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

Labels

api: spanner Issues related to the Spanner API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant