-
Notifications
You must be signed in to change notification settings - Fork 870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capture the SNS topic ARN under the 'messaging.destination.name' span attribute. #10096
Conversation
…stination.name' span attributed.
Should the same change also be made for aws 1 instrumentation? Ideally I think we should change the SNS spans to follow messaging semantic conventions like we did for SQS, though this is probably too much effort and out of scope for this issue. |
@laurit, I'd be happy to update the AWS SDK v1 instrumentation as well though I don't see explicit support for SNS as I do in the v2 instrumentation. |
@tduncan I think in aws1 sdk you'd need to add an accessor in https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/RequestAccess.java that lets you reflectively retrieve the value and create an attribute extractor similar to https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AwsSdkExperimentalAttributesExtractor.java Can't use Line 44 in 2199cc5
Line 48 in 2199cc5
|
...g/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2ClientTest.groovy
Show resolved
Hide resolved
@laurit, thanks for the tips! I'll explore the v1 SDK instrumentation in more detail. |
…e if provided with preference for the topic ARN.
@Override | ||
public void onStart(AttributesBuilder attributes, Context parentContext, Request<?> request) { | ||
String destination = findMessageDestination(request.getOriginalRequest()); | ||
if (destination != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually we use
Lines 22 to 27 in 1ee51e4
public static <T> void internalSet( | |
AttributesBuilder attributes, AttributeKey<T> key, @Nullable T value) { | |
if (value != null) { | |
attributes.put(key, value); | |
} | |
} |
....2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AwsSdkRequestType.java
Show resolved
Hide resolved
…e set on an AWS SDK v2 request.
Addresses #10030