Retrieve gRPC server.address/server.port from gRPC target#16161
Draft
trask wants to merge 11 commits intoopen-telemetry:mainfrom
Draft
Retrieve gRPC server.address/server.port from gRPC target#16161trask wants to merge 11 commits intoopen-telemetry:mainfrom
server.address/server.port from gRPC target#16161trask wants to merge 11 commits intoopen-telemetry:mainfrom
Conversation
4828a53 to
c45ee61
Compare
lmolkova
reviewed
Feb 13, 2026
...grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/GrpcTelemetry.java
Show resolved
Hide resolved
c45ee61 to
ce22789
Compare
laurit
reviewed
Feb 17, 2026
...grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/GrpcTelemetry.java
Outdated
Show resolved
Hide resolved
laurit
reviewed
Feb 17, 2026
...grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/GrpcTelemetry.java
Outdated
Show resolved
Hide resolved
laurit
approved these changes
Feb 17, 2026
9a1c3d7 to
2a0e0b9
Compare
laurit
reviewed
Feb 25, 2026
...grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/GrpcTelemetry.java
Outdated
Show resolved
Hide resolved
0f60636 to
dd4d89f
Compare
7e67249 to
6ae035b
Compare
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>
6ae035b to
d93c7e4
Compare
d93c7e4 to
e19f9d2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently built on top of
Prototype for open-telemetry/semantic-conventions#3317
Java agent instrumentation can do this for all gRPC versions.
Library instrumentation can only do this (automatically) using an internal gRPC API available since version 1.64.0: InternalManagedChannelBuilder.
I'm not convinced about the API / dependency on internals, could limit us on marking it stable, but marking ready-for-review to get feedback.
Related to #15871