Skip to content

Conversation

lukeina2z
Copy link
Contributor

Description

The AWS SNS semantic convention defines the attribute aws.sns.topic.arn: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/aws.md#amazon-sns-attributes

Currently, this attribute is not set in the botocore instrumentation library.

Fixes # (issue)
This PR adds support for it by setting the attribute from both the request and response objects.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

New unit tests added and passing.
Verified with:
tox -e py312-test-instrumentation-botocore
tox -e spellcheck
tox -e lint-instrumentation-botocore
tox -e ruff

Backward Compatibility
There is no risk of breaking existing functionality. This change only adds instrumentation for an additional AWS resource without modifying the existing behavior of the auto-instrumentation library.

Does This PR Require a Core Repo Change?

  • [x ] No.

…opic.arn

The AWS SNS semantic convention defines the attribute aws.sns.topic.arn:
https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/aws.md#amazon-sns-attributes

Currently, this attribute is not set in the botocore instrumentation library.
This PR adds support for it by setting the attribute from both the request and response objects.

Tests
New unit tests added and passing.

Verified with:
tox -e py312-test-instrumentation-botocore
tox -e spellcheck
tox -e lint-instrumentation-botocore
tox -e ruff

Backward Compatibility
There is no risk of breaking existing functionality.
This change only adds instrumentation for an additional AWS resource without modifying the existing behavior of the auto-instrumentation library.
@lukeina2z lukeina2z requested a review from a team as a code owner September 5, 2025 16:10
Copy link

@yiyuan-he yiyuan-he left a comment

Choose a reason for hiding this comment

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

LGTM ty!

@xrmx xrmx enabled auto-merge (squash) September 9, 2025 13:27
@xrmx xrmx merged commit 6525da4 into open-telemetry:main Sep 9, 2025
632 checks passed
@github-project-automation github-project-automation bot moved this from Ready for review to Done in @xrmx's Python PR digest Sep 9, 2025
@lukeina2z lukeina2z deleted the pr-sns-foo branch September 29, 2025 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants