Automated fix for refs/heads/python-o11y-retry-metrics#6
Open
github-actions[bot] wants to merge 7 commits into
Open
Automated fix for refs/heads/python-o11y-retry-metrics#6github-actions[bot] wants to merge 7 commits into
github-actions[bot] wants to merge 7 commits into
Conversation
Update Makefile
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>
a607934 to
488f4c5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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