-
Notifications
You must be signed in to change notification settings - Fork 798
refactor: semcov opentelemetry instrumentation aio pika #3667
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
Merged
xrmx
merged 13 commits into
open-telemetry:main
from
EzzioMoreira:refactor/opentelemetry-instrumentation-aio-pika
Sep 9, 2025
Merged
refactor: semcov opentelemetry instrumentation aio pika #3667
xrmx
merged 13 commits into
open-telemetry:main
from
EzzioMoreira:refactor/opentelemetry-instrumentation-aio-pika
Sep 9, 2025
Conversation
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
emdneto
reviewed
Jul 31, 2025
...elemetry-instrumentation-aio-pika/src/opentelemetry/instrumentation/aio_pika/span_builder.py
Outdated
Show resolved
Hide resolved
...elemetry-instrumentation-aio-pika/src/opentelemetry/instrumentation/aio_pika/span_builder.py
Outdated
Show resolved
Hide resolved
...elemetry-instrumentation-aio-pika/src/opentelemetry/instrumentation/aio_pika/span_builder.py
Outdated
Show resolved
Hide resolved
emdneto
approved these changes
Aug 6, 2025
xrmx
reviewed
Aug 11, 2025
...elemetry-instrumentation-aio-pika/src/opentelemetry/instrumentation/aio_pika/span_builder.py
Outdated
Show resolved
Hide resolved
xrmx
approved these changes
Sep 9, 2025
chloe-zh97
pushed a commit
to chloe-zh97/opentelemetry-python-contrib
that referenced
this pull request
Sep 10, 2025
…ry#3667) * feat: refactor semcov opentelemetry-instrumentation * fix: return shema senconv * refactor: opentelemetry-instrumentation-aio-pika * fix: revert unintended changes to _semconv.py * fix: change schema * fix: change schema * fix: spanattribute messaging id * fix: spanattribute messaging id --------- Co-authored-by: Emídio Neto <[email protected]>
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.
Description
A lot of code imports semantic conventions attributes from opentelemetry.semconv.trace.SpanAttributes instead of the preferred opentelemetry.semconv.attributes and opentelemetry.semconv.incubating.
This PR refactors the semantic conventions to use the new stable attribute modules instead of the deprecated SpanAttributes class.
Transition to New Semantic Conventions:
Attribute Updates in Instrumentation Code:
SpanAttributes
with new_incubating
attributes (e.g.,MESSAGING_SYSTEM
,NET_PEER_NAME
) inspan_builder.py
for setting messaging and network-related attributes. ([[1]](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3667/files#diff-711c76942ba309cc5ba4848f1c882dced107f7827ac012939681e958b450e639R19-R36)
,[[2]](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3667/files#diff-711c76942ba309cc5ba4848f1c882dced107f7827ac012939681e958b450e639L47-R58)
,[[3]](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3667/files#diff-711c76942ba309cc5ba4848f1c882dced107f7827ac012939681e958b450e639L64-R95)
)Updates in Test Files:
test_callback_decorator.py
andtest_publish_decorator.py
to use the new_incubating
attributes. ([[1]](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3667/files#diff-96077bf1420276e86dafe08062f4484432064fb5730ae3b9b4786e828850a072L43-R59)
,[[2]](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3667/files#diff-500514cf8be14e4864fdf49daa4c761c0b1ad0c358cec84b4e26a2c62c1c5dffL47-R63)
)MESSAGING_SYSTEM
toMESSAGING_SYSTEM_VALUE
inconsts.py
for consistency with the new conventions. ([instrumentation/opentelemetry-instrumentation-aio-pika/tests/consts.pyL9-R9](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3667/files#diff-0f62be73cc5762de3b1f94f123557d7ec78c071062420d096243f79631197725L9-R9)
)Helper Methods Refactor:
_semconv.py
to replaceSpanAttributes
with the corresponding_incubating
attributes (e.g.,HTTP_METHOD
,NET_PEER_PORT
). This ensures compatibility with the updated semantic conventions. ([[1]](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3667/files#diff-b3ec9cae86265a9c45bffb034e071516f6926ac72d702023bc9b52a7b49c4a90L290-R342)
,[[2]](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3667/files#diff-b3ec9cae86265a9c45bffb034e071516f6926ac72d702023bc9b52a7b49c4a90L368-R397)
)Refs: #3475
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.