Implement OpenTelemetry metrics#160
Merged
anuraaga merged 5 commits intoconnectrpc:mainfrom Mar 10, 2026
Merged
Conversation
Signed-off-by: Anuraag Agrawal <[email protected]>
Signed-off-by: Anuraag Agrawal <[email protected]>
Signed-off-by: Anuraag Agrawal <[email protected]>
stefanvanburen
approved these changes
Mar 9, 2026
Member
stefanvanburen
left a comment
There was a problem hiding this comment.
lgtm based on the upstream RPC metrics spec, just wondering about the error case for clients (I might have just missed that on the first PR; still need more coffee)
connectrpc-otel/test/test_traces.py
Outdated
| client_attrs = spans[1].attributes | ||
| assert client_attrs is not None | ||
| # Client just sees a ConnectError | ||
| assert "error.type" not in client_attrs |
Member
There was a problem hiding this comment.
I realize this hasn't landed in this PR, but based on https://opentelemetry.io/docs/specs/semconv/rpc/rpc-metrics/#metric-rpcclientcallduration, I guess I'd expect error.type to be set on the client on failure?
Collaborator
Author
There was a problem hiding this comment.
Thanks for catching this - I had read the details on https://opentelemetry.io/docs/specs/semconv/registry/attributes/error/ but apparently misread them, it does seem clear error.type is populated along with any domain-specific code
…nto otel-metrics
Signed-off-by: Anuraag Agrawal <[email protected]>
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.
https://opentelemetry.io/docs/specs/semconv/rpc/rpc-metrics/#metric-rpcclientcallduration
Also removes workarounds by bumping pyqwest