Skip to content

Capture gRPC UNKNOWN requests#16214

Draft
trask wants to merge 12 commits intoopen-telemetry:mainfrom
trask:grpc-unknown
Draft

Capture gRPC UNKNOWN requests#16214
trask wants to merge 12 commits intoopen-telemetry:mainfrom
trask:grpc-unknown

Conversation

@trask
Copy link
Member

@trask trask commented Feb 17, 2026

Currently built on top of

Resolves #15690

Related to #15871

@trask trask force-pushed the grpc-unknown branch 2 times, most recently from 5077197 to cdfa917 Compare February 17, 2026 17:51
@trask trask force-pushed the grpc-unknown branch 5 times, most recently from 61aa2e2 to d2e67c0 Compare February 25, 2026 04:23
@trask trask changed the title Prototype: Capture gRPC UNKNOWN requests Capture gRPC UNKNOWN requests Feb 25, 2026
@trask trask force-pushed the grpc-unknown branch 6 times, most recently from 0db6fec to 577c288 Compare February 26, 2026 03:13
@trask trask force-pushed the grpc-unknown branch 2 times, most recently from ba9128c to b63c258 Compare February 27, 2026 03:19
trask and others added 10 commits February 26, 2026 19:47
Per the stable gRPC semconv spec, rpc.response.status_code should use
the named status code (OK, CANCELLED, UNAVAILABLE, etc.) not the
numeric value (0, 2, 14).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Fix missed status code assertions in streaming and clientErrorThrown tests

Use Status.Code.name() instead of String.valueOf(Status.Code.*.value()) for
rpc.response.status_code assertions in AbstractGrpcStreamingTest and the
clientErrorThrown test in AbstractGrpcTest.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
In rpc/dup mode, span attributes can only hold one value for rpc.method.
The dualEmitContextCustomizer stashes the old rpc.method value in
context so RpcClientMetrics/RpcServerMetrics can use it for old metrics.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Suppress deprecation warning for RpcMetricsContextCustomizers in build()

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests the full gRPC pipeline in rpc/dup mode to catch issues like
missing context customizer wiring that would produce wrong rpc.method
values on old metrics.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The stable semconv spec uses rpc.request.metadata.<key> instead of
rpc.grpc.request.metadata.<key>. Add stableRequestAttributeKey() to
CapturedGrpcMetadataUtil and use it when stable semconv is active.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The library tests exercise GrpcTelemetryBuilder.build() directly,
which is the code path where issues like missing context customizer
wiring would be caught.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Fix RPC_SYSTEM assertions for rpc/dup semconv mode in tests

Replace equalTo(maybeStable(RPC_SYSTEM), "grpc") with dual RPC_SYSTEM and
RPC_SYSTEM_NAME assertions in AbstractGrpcTest and AbstractGrpcStreamingTest,
to correctly handle rpc/dup mode where both attributes are emitted.
Also removes the now-unused maybeStable import from both test files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- ArmeriaGrpcTest: use Status.Code.OK.name() instead of
  String.valueOf(Status.Code.OK.value()) for rpc.response.status_code,
  matching the GrpcAttributesExtractor implementation
- grpc-1.6 build.gradle.kts: add testLatestDeps system property and
  IPv4 preference to testStableSemconv and testBothSemconv tasks,
  matching the existing test task configuration

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@trask trask force-pushed the grpc-unknown branch 2 times, most recently from a031ccd to 5ee3b68 Compare February 28, 2026 21:41
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.

gRPC server instrumentation: no spans created for unknown service

1 participant