Skip to content

Conversation

arjan-bal
Copy link
Contributor

@arjan-bal arjan-bal commented Jul 31, 2025

gRPC Go has been specifying units as non-standard values such as call and endpoint instead of using annotations like {call}. Based on the metric naming conventions anything enclosed in curly braces is an annotation and in the absence of a prefix, the unit is 1. The gRPC docs also mention that non-standard units need to be enclosed in curly braces: https://grpc.io/docs/guides/opentelemetry-metrics/#per-call-metrics.

This bug was caught due to a regression in the otel prometheus exporter: #8479

RELEASE NOTES:

  • stats: fixed metric unit formatting by enclosing non-standard units like call and endpoint in curly braces to comply with UCUM and gRPC OpenTelemetry guidelines.

@arjan-bal arjan-bal added this to the 1.75 Release milestone Jul 31, 2025
@arjan-bal arjan-bal added Type: Bug Area: Observability Includes Stats, Tracing, Channelz, Healthz, Binlog, Reflection, Admin, GCP Observability labels Jul 31, 2025
@arjan-bal arjan-bal force-pushed the metrics-use-annotations branch from a75e77c to 9b04f93 Compare July 31, 2025 19:39
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.35%. Comparing base (ac13172) to head (9b04f93).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8481   +/-   ##
=======================================
  Coverage   82.35%   82.35%           
=======================================
  Files         413      413           
  Lines       40518    40518           
=======================================
+ Hits        33368    33369    +1     
+ Misses       5781     5779    -2     
- Partials     1369     1370    +1     
Files with missing lines Coverage Δ
balancer/pickfirst/pickfirstleaf/pickfirstleaf.go 86.49% <ø> (-0.59%) ⬇️
balancer/rls/balancer.go 85.26% <ø> (ø)
balancer/weightedroundrobin/balancer.go 83.71% <ø> (ø)
stats/opentelemetry/client_metrics.go 85.08% <100.00%> (ø)
...tats/opentelemetry/internal/testutils/testutils.go 94.69% <100.00%> (ø)
stats/opentelemetry/server_metrics.go 87.26% <100.00%> (ø)
xds/internal/xdsclient/clientimpl.go 82.52% <ø> (ø)

... and 16 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arjan-bal arjan-bal requested a review from dfawley July 31, 2025 19:44
@arjan-bal arjan-bal changed the title stats: change non-standard unit to annotations stats: change non-standard units to annotations Jul 31, 2025
@dfawley dfawley assigned arjan-bal and unassigned dfawley Jul 31, 2025
@arjan-bal arjan-bal merged commit 85240a5 into grpc:master Aug 1, 2025
26 of 27 checks passed
dimpavloff pushed a commit to dimpavloff/grpc-go that referenced this pull request Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Observability Includes Stats, Tracing, Channelz, Healthz, Binlog, Reflection, Admin, GCP Observability Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants