Skip to content

Automated fix for refs/heads/python-o11y-retry-metrics#6

Open
github-actions[bot] wants to merge 7 commits into
python-o11y-retry-metricsfrom
create-pull-request/patch-a607934
Open

Automated fix for refs/heads/python-o11y-retry-metrics#6
github-actions[bot] wants to merge 7 commits into
python-o11y-retry-metricsfrom
create-pull-request/patch-a607934

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

PanCakes to the rescue!

We noticed that our 'sanity' test was going to fail, but we think we can fix that automatically, so we put together this PR to do just that!

If you'd like to opt-out of these PR's, add yourself to NO_AUTOFIX_USERS in .github/workflows/pr-auto-fix.yaml

znaczko and others added 7 commits March 17, 2026 13:11
Implements the per-call retry metrics from gRFC A66 in the Python
OpenTelemetry observability plugin:

  - grpc.client.call.retries
  - grpc.client.call.transparent_retries
  - grpc.client.call.retry_delay

The core call tracer already recorded these measures on call tracer
destruction, but the Python layer never registered recorders for them,
so the data was dropped. This change:

  - defines the three metrics in _open_telemetry_measures.py
  - registers them as histograms, gated behind a new opt-in
    enable_retry_per_call_metrics flag on OpenTelemetryPlugin
    (experimental metrics are off by default per gRFC A66)
  - skips zero values so calls without retries are not reported,
    matching the C++ OTel plugin behavior
  - adds the grpc.target label to the call-level retry measures in
    client_call_tracer.cc (previously only grpc.method was attached)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds a flaky test server that fails the first N attempts with
UNAVAILABLE and a client helper with a retry policy, then verifies:

  - grpc.client.call.retries and grpc.client.call.retry_delay are
    recorded with the expected values and method/target labels when
    enable_retry_per_call_metrics is set
  - transparent retries are not reported when none happened
  - retry metrics are off by default
  - zero values are not reported for calls without retries

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@znaczko znaczko force-pushed the python-o11y-retry-metrics branch from a607934 to 488f4c5 Compare July 6, 2026 18:16
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