Skip to content

feat(spanner): Add gRPC A66/A94 metrics#13825

Merged
rahul2393 merged 6 commits intogoogleapis:mainfrom
HailongWen:main
Mar 5, 2026
Merged

feat(spanner): Add gRPC A66/A94 metrics#13825
rahul2393 merged 6 commits intogoogleapis:mainfrom
HailongWen:main

Conversation

@HailongWen
Copy link
Copy Markdown
Contributor

This change adds grpc.client.attempt.started metric in gRPC A66 and all the
subchannel metrics in gRPC A94.

Similar to the Java counterpart, this change also updates the exporter to
handle the gauge metric correctly. Local tests show confirm that
Int64UpDownCounter generates Sum data points (with IsMonotonic=false)
instead of Gauge data.

This change adds `grpc.client.attempt.started` metric in gRPC A66 and all the
subchannel metrics in gRPC A94.

Similar to the Java counterpart, this change also updates the exporter to
handle the gauge metric correctly. Local tests show confirm that
`Int64UpDownCounter` generates `Sum` data points (with `IsMonotonic=false`)
instead of `Gauge` data.
@HailongWen HailongWen requested a review from a team February 10, 2026 09:10
@HailongWen HailongWen requested review from a team as code owners February 10, 2026 09:10
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

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 adds support for new gRPC metrics from A66 and A94 specifications. The changes correctly enable these metrics and their optional labels. A significant part of the change is updating the metrics exporter to correctly handle Gauge metrics, which are identified from Sum data points where IsMonotonic is false. The implementation looks correct, but I have one suggestion to improve code readability in the time interval handling logic for gauges.

@quartzmo quartzmo changed the title feat: Add gRPC A66/A94 metrics feat(spanner): Add gRPC A66/A94 metrics Feb 10, 2026
@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Feb 11, 2026
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 26, 2026
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 26, 2026
@HailongWen HailongWen requested a review from a team as a code owner February 26, 2026 19:03
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 4, 2026
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 4, 2026
@rahul2393 rahul2393 merged commit d695802 into googleapis:main Mar 5, 2026
10 of 11 checks passed
rahul2393 added a commit that referenced this pull request Mar 26, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.8.4
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/librarian-go@sha256:ac1efa3ad3c6d99efed878535b3a0fe63d0cce6701c335f03811d8b49004d652
<details><summary>spanner: v1.89.0</summary>

##
[v1.89.0](spanner/v1.88.0...spanner/v1.89.0)
(2026-03-26)

### Features

* Add E2E fallback to the spanner client. (#13518)
([16af6a1](16af6a1c))

* include cache updates and routing hint into BeginTransaction and
Commit request/response respectively (PiperOrigin-RevId: 878019893)
([9c80b8b](9c80b8b4))

* add SI, adapt, split point related proto (PiperOrigin-RevId:
871366927)
([d3eb851](d3eb851d))

* Add gRPC A66/A94 metrics (#13825)
([d695802](d695802a))

* support Scan from string to NullUUID (#14128)
([d897b6d](d897b6db))

### Bug Fixes

* replace multiplexed session request loop with shared in-flight
creation (#14215)
([3e3bd2d](3e3bd2d3))

* guard rollback when aborted commit cleared session handle (#14218)
([6315105](63151055))

### Documentation

* A comment for field `routing_hint` in messages
`.google.spanner.v1.ResultSet` and `.google.spanner.v1.PartialResultSet`
are changed (PiperOrigin-RevId: 878019893)
([9c80b8b](9c80b8b4))

* A comment in message
`.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode` is
changed (PiperOrigin-RevId: 878019893)
([9c80b8b](9c80b8b4))

* A comment for message `ListCloudInstancesAction` is changed
(PiperOrigin-RevId: 871366927)
([d3eb851](d3eb851d))

* A comment for field `execution_options` in message
`.google.spanner.executor.v1.StartTransactionAction` is changed
(PiperOrigin-RevId: 871366927)
([d3eb851](d3eb851d))

* A comment for message `TransactionExecutionOptions` is changed
(PiperOrigin-RevId: 871366927)
([d3eb851](d3eb851d))

</details>
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.

4 participants