-
Notifications
You must be signed in to change notification settings - Fork 760
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
Open
EzzioMoreira
wants to merge
8
commits into
open-telemetry:main
Choose a base branch
from
EzzioMoreira:refactor/opentelemetry-instrumentation-aio-pika
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
refactor: semcov opentelemetry instrumentation aio pika #3667
EzzioMoreira
wants to merge
8
commits into
open-telemetry:main
from
EzzioMoreira:refactor/opentelemetry-instrumentation-aio-pika
+64
−35
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
if properties.correlation_id: | ||
self._attributes[SpanAttributes.MESSAGING_CONVERSATION_ID] = ( | ||
self._attributes[MESSAGING_MESSAGE_CONVERSATION_ID] = ( |
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.
This is a different attribute
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.
oh, that's true. missed that @EzzioMoreira can you fix that?
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)
)Fixes: #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.