Skip to content

prepare semconv utilities to support messaging stability opt-in - #4974

Open
emdneto wants to merge 2 commits into
open-telemetry:mainfrom
emdneto:emd/messaging-attribute-migration
Open

prepare semconv utilities to support messaging stability opt-in#4974
emdneto wants to merge 2 commits into
open-telemetry:mainfrom
emdneto:emd/messaging-attribute-migration

Conversation

@emdneto

@emdneto emdneto commented Aug 18, 2026

Copy link
Copy Markdown
Member

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.

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
@emdneto
emdneto requested a review from a team as a code owner August 18, 2026 23:55
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Aug 18, 2026

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-08-21 01:51 UTC

Two things need attention:

  • Required checks are failing — investigate the failures.
  • 1 review item — respond to each (e.g. link a commit, explain why not, ask a follow-up):
    • Inline threads: 1
Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Should this be with reviewers? Comment /dashboard route:reviewers to route it to them.
  • Anything wrong — including the routing? Report it with what you expected; it helps us improve the dashboard.

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
@emdneto emdneto moved this to Ready for review in Python PR digest Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

2 participants