Skip to content
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 SNS Topic ARNs as an attribute #10030

Closed
tduncan opened this issue Dec 7, 2023 · 4 comments
Closed

Capture SNS Topic ARNs as an attribute #10030

tduncan opened this issue Dec 7, 2023 · 4 comments
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request

Comments

@tduncan
Copy link
Contributor

tduncan commented Dec 7, 2023

Is your feature request related to a problem? Please describe.

Important messaging details are not explicitly captured when instrumenting AWS SNS publish API calls. Depending on the version of the AWS SDK in use there may be information included as query parameters -- which is captured by the OpenTelemetry instrumentation -- but newer versions of the SDK have switched to including that information in the request body causing the information to be completely missing from the emitted spans.

Of particular concern in the SNS topic ARN to uniquely identify the SNS topic.

Describe the solution you'd like

Record the SNS topic ARN using the messaging.destination.name attribute.

Describe alternatives you've considered

Older versions of the AWS SDK utilize HTTP query parameters and included the SNS Topic ARN.

Example:
Below is an example of details included as HTTP query parameters

Attributes:
      -> http.method: Str(POST)
      -> rpc.system: Str(aws-api)
      -> thread.name: Str(main)
     -> http.url: Str(https://sns.us-west-2.amazonaws.com?Action=Publish&Version=2010-03-31&TopicArn=<arn>&Message=<message>)
      -> thread.id: Int(1)
      -> http.request_content_length: Int(141)
      -> rpc.service: Str(Sns)
      -> rpc.method: Str(Publish)
      -> http.status_code: Int(200)
      -> net.peer.name: Str(sns.us-west-2.amazonaws.com)
      -> user_agent.original: Str(aws-sdk-java/2.20.160 Linux/4.14.255-318-256.530.amzn2.x86_64 OpenJDK_64-Bit_Server_VM/17.0.8.1+8-LTS Java/17.0.8.1 vendor/Amazon.com_Inc. exec-env/AWS_Lambda_java17 io/sync http/Apache cfg/retry-mode/legacy)
      -> http.response_content_length: Int(294)

Additional context

The same issue has been raised and accepted in the NodeJS (issue, commit) and Python (issue, commit).

@tduncan tduncan added enhancement New feature or request needs triage New issue that requires triage labels Dec 7, 2023
@zeitlinger
Copy link
Member

sounds good

@trask trask added contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome and removed needs triage New issue that requires triage labels Dec 12, 2023
@trask
Copy link
Member

trask commented Dec 12, 2023

@tduncan
Copy link
Contributor Author

tduncan commented Dec 15, 2023

I'd be happy to take this on.

@laurit
Copy link
Contributor

laurit commented Jan 5, 2024

Resolved with #10096

@laurit laurit closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants