• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

grpc / grpc-java / #20272 / 1
89%
master: 89%

Build:
DEFAULT BRANCH: master
Ran 07 May 2026 12:46PM UTC
Files 653
Run time 22s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 May 2026 12:34PM UTC coverage: 88.836% (+0.008%) from 88.828%
#20272.1

push

github

web-flow
core,opentelemetry: Fix server metric labels on early close (#12774)

This addresses the server-side OpenTelemetry metric labeling bug from
#12117 where a generated method can be recorded as `grpc.method="other"`
if `streamClosed()` happens before `serverCallStarted()`.

### What changed

- add an internal `StatsTraceContext.ServerCallMethodListener` hook so
tracers can consume an already-resolved primary-registry
`MethodDescriptor`
- resolve the immutable internal primary registry on the transport path
and seed method classification before the async `MethodLookup` path runs
- keep fallback registry lookup on the existing async path
- update the OpenTelemetry server tracer to use the early-resolved
method classification for close metrics

### Why this shape

- avoids tracer-side `HandlerRegistry` lookup
- uses only the immutable internal primary registry for early
transport-path lookup
- keeps fallback registry lookup on the existing async path

### Tests

- primary generated method: early close preserves the generated method
name
- primary non-generated method: early close still records `other`
- fallback generated method: fallback lookup remains on the existing
async path and does not introduce early transport-path classification
- tracer-level regression: `serverCallMethodResolved()` +
`streamClosed()` records the generated method name without waiting for
`serverCallStarted()`

### Notes

- `ServerCallMethodListener` is an internal hook that carries the
resolved `MethodDescriptor`; tracers consume the resolved result instead
of performing registry lookup themselves
- `ServerImpl` uses `InternalHandlerRegistry` explicitly for the primary
registry to make it clear that the early transport- path lookup is
limited to the immutable internal primary registry
- this PR intentionally does not widen transport-path lookup to the
fallback registry

Ref #12117

36260 of 40817 relevant lines covered (88.84%)

0.89 hits per line

Source Files on job #20272.1
  • Tree
  • List 653
  • Changed 11
  • Source Changed 0
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 20272
  • 0248e6f7 on github
  • Prev Job for on master (##20271.1)
  • Next Job for on master (##20273.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc