Skip to content

Update to the latest messaging semantic sonventions in 3.0 #19254

Description

@trask

The main worry I had with doing this was if other languages were sticking to the v1.24 messaging semantic conventions as recommended, in which case polyglot services would be adversely affected by us moving to the latest experimental messaging semantic conventions.

Did some AI-assisted research though and this this does not appear to be the case...

Post-v1.24 milestones used

Release Convention introduced
v1.25 process operation and process metrics; settlement spans; messaging.destination.partition.id
v1.26 messaging.operation.name; messaging.operation.type; messaging.client.id
v1.27 Operation-first span names; current operation/consumed metrics; messaging.consumer.group.name; messaging.kafka.offset; per-message link attributes
v1.28 Exhaustive operation-to-kind model; publish type replaced by send; current sent-message metric; optional creation-context parent for a single-message process span; ambient-parent guidance
v1.34 aws.sqs.queue.url; aws.sns.topic.arn

.NET

Pinned revision: 0f901706.

Instrumentation Default post-v1.24 conventions
Confluent.Kafka 0.2 alpha v1.25 messaging.destination.partition.id
v1.26 messaging.operation.name, messaging.operation.type, and messaging.client.id
v1.27 messaging.consumer.group.name, messaging.kafka.offset, operation-first names, messaging.client.operation.duration, messaging.client.consumed.messages, and per-message link attributes
v1.28 send operation value, exhaustive send/poll/process kinds, and messaging.client.sent.messages
Source explicitly pins the v1.43 contract
AWS Lambda SQS v1.28 ambient invocation parent with links to record creation contexts

The default AWS SDK semantic-convention selector does not itself qualify as evidence: its v1.28 mode emits no post-v1.24 messaging attributes. It is therefore excluded from the table.

AWS Lambda SQS is different: it qualifies through trace structure, not attributes. Its default ambient invocation parent plus record links implements the v1.28 guidance for processing under an existing ambient span.

For Confluent.Kafka, tracing and metrics registration are independent. The metrics above are the defaults after registering its metrics instrumentation; Confluent.Kafka does not emit the v1.25 messaging.process.duration metric.

Primary sources: ConfluentKafkaCommon, consumer, and Lambda options.

Go

Pinned revisions: Go contrib bb91f7a9 and compile instrumentation d3e016c6.

Instrumentation Default post-v1.24 conventions
AWS SDK v2 SNS (otelaws) v1.26 messaging.operation.name and messaging.operation.type
v1.28 send operation value
segmentio/kafka-go compile instrumentation v1.25 messaging.destination.partition.id
v1.26 messaging.operation.name and messaging.operation.type
v1.27 messaging.consumer.group.name and messaging.kafka.offset
v1.28 send operation value

These packages demonstrate post-v1.24 attribute adoption even though their spans are not complete current messaging models. The Kafka consumer's direct parent on a receive span is a deviation, not v1.28 evidence, and is intentionally omitted.

Primary sources: SNS attributes and Kafka semconv.

JavaScript

Pinned revision: 2927088f.

Instrumentation Default post-v1.24 conventions
KafkaJS v1.25 messaging.destination.partition.id and messaging.process.duration
v1.26 messaging.operation.name and messaging.operation.type
v1.27 messaging.kafka.offset, operation-first names, messaging.client.operation.duration, messaging.client.consumed.messages, and per-message link attributes
v1.28 send value, exhaustive send/poll/process kinds, and messaging.client.sent.messages
AWS Lambda SQS v1.26 messaging.operation.name and messaging.operation.type
v1.27 operation-first process name and per-message link attributes
v1.28 process-to-CONSUMER kind and ambient-parent guidance
v1.34 aws.sqs.queue.url
AWS SDK SNS v1.34 aws.sns.topic.arn
AWS SDK SQS v1.26 messaging.operation.type
v1.27 per-message receive-link attributes
v1.28 send-to-PRODUCER pairing
amqplib v1.25 process operation
v1.27 operation-first publish name pattern
v1.28 creation-context parent option for the process span

Primary sources: KafkaJS, AWS Lambda, AWS SNS, and amqplib.

Python

Pinned revision: 79f9e575.

Instrumentation Default post-v1.24 conventions
AWS Lambda SQS v1.26 messaging.operation.type
v1.27 operation-first process name and per-message link attributes
v1.28 process-to-CONSUMER kind and ambient-parent guidance
botocore SNS v1.28 send operation value and send-to-PRODUCER pairing
v1.34 aws.sns.topic.arn
boto3sqs v1.25 process operation
pika v1.25 process operation
v1.28 send value and creation-context parent option for process
aio-pika v1.25 process operation
v1.28 send value and creation-context parent option for process
aiokafka v1.28 send operation value
confluent-kafka v1.25 process operation
v1.28 send operation value
kafka-python v1.28 send operation value

Python's shared stability helper has no messaging mode, so these are fixed package defaults rather than a messaging semconv opt-in.

Primary sources: AWS Lambda SQS, botocore extension, and Confluent Kafka.

PHP

Pinned revision: 176b3fc5.

Instrumentation Default post-v1.24 conventions
ExtAmqp v1.25 settlement span concept
v1.26 messaging.operation.type and messaging.client.id
v1.28 settlement-to-CLIENT pairing
ExtRdKafka v1.25 process operation
v1.26 messaging.operation.type
v1.27 messaging.kafka.offset and operation-first send name
v1.28 send value, send-to-PRODUCER pairing, process-to-CONSUMER pairing, and creation-context parent option for process
Laravel queues v1.26 messaging.operation.type
v1.27 operation-first names
v1.28 exhaustive create/send/receive/process kind pairings where applicable and creation-context parent option for process

ExtRdKafka's incorrect consumer span name is a deviation and is not counted as post-v1.24 evidence.

Primary sources: ExtAmqp, ExtRdKafka, and Laravel queue worker.

Ruby

Pinned revision: 447d3a15.

Instrumentation Default post-v1.24 conventions
ActiveJob v1.25 process operation
Sidekiq v1.25 process operation
Resque v1.25 process operation
Que v1.25 process operation
DelayedJob v1.25 process operation
Bunny v1.25 process operation
v1.28 creation-context parent option for process
ruby-kafka v1.25 process operation
v1.27 messaging.kafka.offset
rdkafka v1.25 process operation
v1.27 messaging.kafka.offset
Racecar v1.25 process operation
v1.27 messaging.kafka.offset

The job instrumentations retain many legacy attributes, but their default process terminology is still a post-v1.24 convention. This is direct evidence of hybrid default adoption.

Primary sources: ActiveJob, Sidekiq, Resque, and Que.

Erlang/Elixir

Pinned revision: 04894327.

Instrumentation Default post-v1.24 conventions
Oban v1.26 messaging.operation.name, messaging.operation.type, and messaging.client.id
v1.27 operation-first send/process names and per-job link attributes
v1.28 exhaustive PRODUCER/CONSUMER pairings
Broadway v1.26 messaging.operation.type=process
v1.27 message IDs on batch links
v1.28 process-to-CONSUMER pairing

Commanded is omitted because its post-v1.24 reference is only a comparison showing that direct parentage on a receive-oriented span is a deviation. It does not emit a qualifying default post-v1.24 convention.

Primary sources: Oban producer, Oban consumer, and Broadway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions