Skip to content

feat(xds-client): gRFC A78 XdsClient metrics + extension point#2669

Open
YutaoMa wants to merge 1 commit into
grpc:masterfrom
YutaoMa:xds-client-metrics
Open

feat(xds-client): gRFC A78 XdsClient metrics + extension point#2669
YutaoMa wants to merge 1 commit into
grpc:masterfrom
YutaoMa:xds-client-metrics

Conversation

@YutaoMa
Copy link
Copy Markdown
Contributor

@YutaoMa YutaoMa commented Jun 2, 2026

Motivation

Ref: #2444

Improve the production readiness of tonic-xds library by supporting metrics.

Solution

This PR builds the foundation for the following metrics-related gRFCs support in tonic-xds:

  1. A78: XdsClient metrics
  2. A79: framework-agnostic non-per-call metrics abstraction

It adds the following:

  1. MetricsRecorder trait, allowing external users to build any telemetry framework integration they need.
  2. 5 A78 XdsClient metrics definition: grpc.xds_client.{connected, server_failure, resource_updates_valid, resource_updates_invalid, resources}
  3. NoOpRecorder as a default fallback.

A follow-up PR to add a bundled OpenTelemetry implementation is planned.

Adds a framework-agnostic `MetricsRecorder` trait (modeled after gRFC
A79) and emits the five A78 XdsClient metrics from the ADS worker:
`grpc.xds_client.{connected, server_failure, resource_updates_valid,
resource_updates_invalid, resources}`. Only `NoOpRecorder` ships in
this PR; a bundled OpenTelemetry implementation is planned for a
follow-up.

Assumes one `XdsClient` instance per channel target; supporting pooled
clients with per-channel attribution would require additional plumbing
(called out in the relevant struct/method docs).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant