Skip to content

Check if otelgrpc metrics are enabled#8792

Merged
dashpole merged 2 commits into
open-telemetry:mainfrom
dashpole:grpc_enabled
Apr 10, 2026
Merged

Check if otelgrpc metrics are enabled#8792
dashpole merged 2 commits into
open-telemetry:mainfrom
dashpole:grpc_enabled

Conversation

@dashpole
Copy link
Copy Markdown
Contributor

@dashpole dashpole commented Apr 9, 2026

Part of open-telemetry/opentelemetry-go#7800

The only synchronous metric is the duration histogram. This updates it to check whether it is enabled before computing attributes or recording observations.

@dashpole dashpole added the Skip Changelog Allow PR to succeed without requiring an addition to the CHANGELOG label Apr 9, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.5%. Comparing base (97de447) to head (aa14c90).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #8792   +/-   ##
=====================================
  Coverage   83.5%   83.5%           
=====================================
  Files        192     192           
  Lines      15630   15637    +7     
=====================================
+ Hits       13061   13068    +7     
  Misses      2121    2121           
  Partials     448     448           
Files with missing lines Coverage Δ
...n/google.golang.org/grpc/otelgrpc/stats_handler.go 96.6% <100.0%> (+<0.1%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dashpole dashpole marked this pull request as ready for review April 9, 2026 16:28
@dashpole dashpole requested a review from a team as a code owner April 9, 2026 16:28
@dashpole dashpole merged commit 5abc640 into open-telemetry:main Apr 10, 2026
30 checks passed
@dashpole dashpole deleted the grpc_enabled branch April 10, 2026 19:04
@pellared pellared added this to the v1.44.0 milestone May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog Allow PR to succeed without requiring an addition to the CHANGELOG

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants