Emit RPC exceptions as logs under the opt-in preview#18890
Merged
Conversation
trask
force-pushed
the
trask/rpc-exception-events
branch
from
June 3, 2026 18:37
9d98d89 to
270e594
Compare
trask
force-pushed
the
trask/rpc-exception-events
branch
from
June 3, 2026 20:00
270e594 to
e9d6546
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aligns RPC-related instrumentations with the opt-in exception-as-logs preview (otel.semconv.exception.signal.preview=logs) by configuring RPC-specific exception log event names and severities via a shared helper in the incubator API, and wiring it into several RPC client/server instrumenters.
Changes:
- Introduces
RpcExceptionEventExtractorsto set RPC client/server exception logeventNameandSeverity. - Registers the RPC exception event extractor on RPC client/server instrumenter builders across gRPC, Thrift, Dubbo, RMI, Spring RMI, and GWT instrumentations.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/rpc/RpcExceptionEventExtractors.java | Adds reusable helpers to configure RPC exception log event names/severities via Experimental.setExceptionEventExtractor. |
| instrumentation/grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/GrpcTelemetryBuilder.java | Configures RPC client/server exception log naming/severity on gRPC instrumenters. |
| instrumentation/thrift-0.13/library/src/main/java/io/opentelemetry/instrumentation/thrift/v0_13/internal/ThriftInstrumenterFactory.java | Configures RPC client/server exception log naming/severity on Thrift instrumenters. |
| instrumentation/apache-dubbo-2.7/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/apachedubbo/v2_7/DubboTelemetryBuilder.java | Configures RPC client/server exception log naming/severity on Dubbo instrumenters. |
| instrumentation/rmi/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rmi/client/RmiClientSingletons.java | Configures RPC client exception log naming/severity for RMI client instrumenter singleton. |
| instrumentation/rmi/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rmi/server/RmiServerSingletons.java | Configures RPC server exception log naming/severity for RMI server instrumenter singleton. |
| instrumentation/spring/spring-rmi-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/rmi/v4_0/SpringRmiSingletons.java | Configures RPC client/server exception log naming/severity for Spring RMI instrumenters. |
| instrumentation/gwt-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/gwt/v2_0/GwtSingletons.java | Configures RPC server exception log naming/severity for GWT RPC instrumenter singleton. |
trask
force-pushed
the
trask/rpc-exception-events
branch
from
June 3, 2026 22:46
e9d6546 to
9664c3c
Compare
trask
force-pushed
the
trask/rpc-exception-events
branch
from
June 5, 2026 15:13
17442a9 to
24616c9
Compare
trask
force-pushed
the
trask/rpc-exception-events
branch
3 times, most recently
from
June 5, 2026 23:24
e0f9f1b to
aac9d9a
Compare
trask
marked this pull request as ready for review
June 6, 2026 00:52
trask
force-pushed
the
trask/rpc-exception-events
branch
from
June 6, 2026 18:45
aac9d9a to
babef05
Compare
laurit
approved these changes
Jun 9, 2026
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.
Under
otel.semconv.exception.signal.preview=logs(introduced in #16259), RPC client and server instrumentations now emit their exceptions as log records instead of span events.Part of follow-up work after #16259.