Emit AWS SDK exceptions as logs under the opt-in preview#18894
Merged
Conversation
f4aff56 to
3d353a5
Compare
fb7de31 to
855a351
Compare
3b502ce to
0bd2856
Compare
0bd2856 to
b8aad6c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the AWS SDK v1.11 and v2.2 instrumentations to configure semantic-convention exception emission so that, when otel.semconv.exception.signal.preview=logs is enabled, exceptions can be emitted as log records (with appropriate event names/severity) instead of span events.
Changes:
- Configure RPC client exception log event naming/severity for the core AWS SDK client instrumenters.
- Configure messaging exception log event naming/severity for SQS receive/process/send instrumenters.
- Configure DB and GenAI exception log event naming/severity for DynamoDB and Bedrock Runtime instrumenters, and thread the exception customizer through the shared instrumenter factory helpers.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/internal/AwsSdkInstrumenterFactory.java | Adds exception-event customizers (RPC/messaging/DB/GenAI) and wires them into instrumenter construction for AWS SDK v2. |
| instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/internal/AwsSdkInstrumenterFactory.java | Adds exception-event customizers (RPC/messaging/DB) and wires them into instrumenter construction for AWS SDK v1. |
laurit
approved these changes
Jun 10, 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), AWS SDK instrumentations now emit their exceptions as log records instead of span events.Part of follow-up work after #16259.