Skip to content

Emit RPC exceptions as logs under the opt-in preview#18890

Merged
laurit merged 5 commits into
open-telemetry:mainfrom
trask:trask/rpc-exception-events
Jun 9, 2026
Merged

Emit RPC exceptions as logs under the opt-in preview#18890
laurit merged 5 commits into
open-telemetry:mainfrom
trask:trask/rpc-exception-events

Conversation

@trask

@trask trask commented Jun 3, 2026

Copy link
Copy Markdown
Member

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.

@trask
trask force-pushed the trask/rpc-exception-events branch from 9d98d89 to 270e594 Compare June 3, 2026 18:37
@trask
trask force-pushed the trask/rpc-exception-events branch from 270e594 to e9d6546 Compare June 3, 2026 20:00
@trask trask changed the title Add RPC exception event extractor helpers Add RPC exception event extractor wiring Jun 3, 2026
@trask trask changed the title Add RPC exception event extractor wiring Emit RPC exceptions as logs under the opt-in preview Jun 3, 2026
@trask
trask requested a review from Copilot June 3, 2026 22:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 RpcExceptionEventExtractors to set RPC client/server exception log eventName and Severity.
  • 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
trask force-pushed the trask/rpc-exception-events branch from e9d6546 to 9664c3c Compare June 3, 2026 22:46
@trask
trask requested a review from Copilot June 4, 2026 23:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

@trask
trask force-pushed the trask/rpc-exception-events branch from 17442a9 to 24616c9 Compare June 5, 2026 15:13
@trask
trask requested a review from Copilot June 5, 2026 16:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

@trask
trask force-pushed the trask/rpc-exception-events branch 3 times, most recently from e0f9f1b to aac9d9a Compare June 5, 2026 23:24
@trask
trask requested a review from Copilot June 6, 2026 00:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.

@trask
trask marked this pull request as ready for review June 6, 2026 00:52
@trask
trask requested a review from a team as a code owner June 6, 2026 00:52
@trask
trask force-pushed the trask/rpc-exception-events branch from aac9d9a to babef05 Compare June 6, 2026 18:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

@laurit
laurit merged commit be33159 into open-telemetry:main Jun 9, 2026
182 of 184 checks passed
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.

3 participants