prepare semconv utilities to support messaging stability opt-in - #4974
Open
emdneto wants to merge 2 commits into
Open
prepare semconv utilities to support messaging stability opt-in#4974emdneto wants to merge 2 commits into
emdneto wants to merge 2 commits into
Conversation
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
Pull request dashboard statusWaiting on the author · refreshed 2026-08-21 01:51 UTC Two things need attention:
Status above doesn't look right?
|
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
6 tasks
There was a problem hiding this comment.
Pull request overview
Adds shared messaging semantic-convention migration utilities.
Changes:
- Adds messaging stability and duplicate modes.
- Adds legacy-to-new messaging attribute setters and schema selection.
- Adds tests and a changelog entry.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.changelog/4974.added |
Records the new utilities. |
opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py |
Implements messaging migration support. |
opentelemetry-instrumentation/tests/test_semconv.py |
Tests modes, schemas, and attribute mappings. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+651
to
+654
| if _report_old(sem_conv_opt_in_mode): | ||
| set_string_attribute(result, SpanAttributes.MESSAGING_OPERATION, operation) | ||
| if _report_new(sem_conv_opt_in_mode): | ||
| set_string_attribute(result, messaging_attributes.MESSAGING_OPERATION_TYPE, operation) |
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
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
As discussed in last week's SIG:
This PR adds helper utilities to support the stability opt-in migration for the Messaging Semantic Conventions. I intentionally pinned the helpers to the latest semantic convention version (1.44.0). Since the messaging conventions are not yet stable, starting with the most recent version seems appropriate to me, but let me know if you don't agree with that.
Contributors can now use these helpers to migrate individual messaging instrumentations.
Quick note: Library-specific attributes, such as those for Kafka and SQS, have intentionally been left out and can be added as needed when each instrumentation is migrated.