Skip to content

Conversation

@vlad-coman-hs
Copy link

This PR addresses the need of adding dynamic attributes on the auto-instrumented metrics from otelgrpc. It potentially addresses #6026 without giving access to the payload since it is not available during every phase which adds complexity when trying to add the labels to all available metrics. It might also generate more confusion to the end user by exposing internal implementation details.

Initial draft that implemented the Labeler pattern from otelhttp (it also explains why it was closed): #8135

@vlad-coman-hs vlad-coman-hs requested review from a team and dashpole as code owners November 19, 2025 09:37
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 19, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@dashpole
Copy link
Contributor

Can you add documentation or an example_test.go to demonstrate how someone could use this to add attributes to metrics?

@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.8%. Comparing base (b45e747) to head (aeed0b9).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #8191   +/-   ##
=====================================
  Coverage   81.8%   81.8%           
=====================================
  Files        194     194           
  Lines      13377   13388   +11     
=====================================
+ Hits       10951   10962   +11     
  Misses      2029    2029           
  Partials     397     397           
Files with missing lines Coverage Δ
...entation/google.golang.org/grpc/otelgrpc/config.go 87.3% <100.0%> (+1.0%) ⬆️
...n/google.golang.org/grpc/otelgrpc/stats_handler.go 98.5% <100.0%> (+<0.1%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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