Skip to content

otelgrpc: add labeler implementation to allow adding custom attributes on metrics#8135

Closed
vlad-coman-hs wants to merge 2 commits into
open-telemetry:mainfrom
vladComan0:main
Closed

otelgrpc: add labeler implementation to allow adding custom attributes on metrics#8135
vlad-coman-hs wants to merge 2 commits into
open-telemetry:mainfrom
vladComan0:main

Conversation

@vlad-coman-hs
Copy link
Copy Markdown

Draft PR to address #6026
Implements the Labeler pattern from otelhttp.

Unfortunately, this pattern does not allow us to add dynamic custom attributes on rpc_server_request_size due to the interceptors executing after the request size metric is recorded. I also applied the Labeler's attributes in the InPayload and OutPayload phases to have a visual example on what that looks like. Note however that this only adds the custom attributes on the rpc_server_response_size, rpc_client_response_size and rpc_client_request_size metrics.

…cs (#1)

* Add labeler implementation to allow adding custom attributes on metrics

* Separate context keys for client and server metrics

* Add labeler support to request/response size metrics

* Add tests for the labeler functionality
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Not Signed

@vlad-coman-hs
Copy link
Copy Markdown
Author

Closing this due to the issue mentioned in the description. Will open another PR dealing with this.

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.

2 participants