semantic-conventions/model/trace/messaging.yaml

237 lines
9.8 KiB
YAML

groups:
- id: messaging.message
type: attribute_group
brief: 'Semantic convention describing per-message attributes populated on messaging spans or links.'
attributes:
- ref: messaging.destination.name
- ref: messaging.message.id
- ref: messaging.message.conversation_id
- ref: messaging.message.envelope.size
- ref: messaging.message.body.size
- id: messaging.destination
type: attribute_group
brief: 'Semantic convention for attributes that describe messaging destination on broker'
note: |
Destination attributes should be set on publish, receive, or other spans
describing messaging operations.
Destination attributes should be set when the messaging operation handles
single messages. When the operation handles a batch of messages,
the destination attributes should only be applied when the attribute value
applies to all messages in the batch.
In other cases, destination attributes may be set on links.
attributes:
- ref: messaging.destination.name
- ref: messaging.destination.template
- ref: messaging.destination.temporary
- ref: messaging.destination.anonymous
- id: messaging.destination_publish
prefix: messaging.destination_publish
type: attribute_group
brief: >
Semantic convention for attributes that describe the publish messaging destination on broker.
The term Publish Destination refers to the destination the message was originally published to.
These attributes should be used on the consumer side when information about
the publish destination is available and different than the destination message are consumed from.
note: |
Publish destination attributes should be set on publish, receive,
or other spans describing messaging operations.
Destination attributes should be set when the messaging operation handles
single messages. When the operation handles a batch of messages,
the destination attributes should only be applied when the attribute value
applies to all messages in the batch.
In other cases, destination attributes may be set on links.
attributes:
- ref: messaging.destination_publish.name
- ref: messaging.destination_publish.anonymous
- id: messaging
type: span
brief: >
This document defines general attributes used in
messaging systems.
extends: messaging.attributes.common
attributes:
- ref: messaging.operation.type
requirement_level: required
- ref: messaging.operation.name
requirement_level:
recommended: If the operation is not sufficiently described by `messaging.operation.type`.
- ref: messaging.batch.message_count
requirement_level:
conditionally_required: If the span describes an operation on a batch of messages.
- ref: messaging.client.id
requirement_level:
recommended: If a client id is available
- ref: messaging.destination.name
requirement_level:
conditionally_required: If span describes operation on a single message or if the value applies to all messages in the batch.
- ref: messaging.destination.partition.id
requirement_level:
recommended: When applicable.
- ref: messaging.destination.template
requirement_level:
conditionally_required: >
If available. Instrumentations MUST NOT use `messaging.destination.name` as template
unless low-cardinality of destination name is guaranteed.
- ref: messaging.destination.temporary
requirement_level:
conditionally_required: If value is `true`. When missing, the value is assumed to be `false`.
- ref: messaging.destination.anonymous
requirement_level:
conditionally_required: If value is `true`. When missing, the value is assumed to be `false`.
- ref: messaging.message.id
- ref: messaging.message.conversation_id
- ref: messaging.message.envelope.size
- ref: messaging.message.body.size
- ref: network.peer.address
brief: Peer address of the messaging intermediary node where the operation was performed.
requirement_level:
recommended: If applicable for this messaging system.
note: >
Semantic conventions for individual messaging systems SHOULD document whether `network.peer.*` attributes are applicable.
Network peer address and port are important when the application interacts with individual intermediary nodes directly,
If a messaging operation involved multiple network calls (for example retries), the address of the last contacted node SHOULD be used.
- ref: network.peer.port
brief: Peer port of the messaging intermediary node where the operation was performed.
requirement_level:
recommended: if and only if `network.peer.address` is set.
- id: messaging.tech_specific.network.attributes
type: attribute_group
brief: Attributes that describe messaging operation along with network information.
extends: messaging
attributes:
- ref: network.peer.address
requirement_level: recommended
note: >
If an operation involved multiple network calls (for example retries), the address of the last contacted node SHOULD be used.
- ref: network.peer.port
requirement_level: recommended
- id: messaging.rabbitmq
type: attribute_group
extends: messaging.tech_specific.network.attributes
brief: >
Attributes for RabbitMQ
attributes:
- ref: messaging.rabbitmq.destination.routing_key
requirement_level:
conditionally_required: If not empty.
tag: tech-specific
- ref: messaging.rabbitmq.message.delivery_tag
requirement_level:
conditionally_required: When available.
tag: tech-specific
- ref: network.peer.address
tag: tech-specific
- ref: network.peer.port
tag: tech-specific
- id: messaging.kafka
type: attribute_group
extends: messaging
brief: >
Attributes for Apache Kafka
attributes:
- ref: messaging.destination.partition.id
brief: >
String representation of the partition id the message (or batch) is sent to or received from.
requirement_level: recommended
tag: tech-specific
- ref: messaging.kafka.message.key
tag: tech-specific
- ref: messaging.kafka.consumer.group
tag: tech-specific
- ref: messaging.kafka.message.offset
tag: tech-specific
- ref: messaging.kafka.message.tombstone
requirement_level:
conditionally_required: If value is `true`. When missing, the value is assumed to be `false`.
tag: tech-specific
- id: messaging.rocketmq
type: attribute_group
extends: messaging
brief: >
Attributes for Apache RocketMQ
attributes:
- ref: messaging.rocketmq.namespace
requirement_level: required
tag: tech-specific
- ref: messaging.rocketmq.client_group
requirement_level: required
tag: tech-specific
- ref: messaging.rocketmq.message.delivery_timestamp
requirement_level:
conditionally_required: If the message type is delay and delay time level is not specified.
tag: tech-specific
- ref: messaging.rocketmq.message.delay_time_level
requirement_level:
conditionally_required: If the message type is delay and delivery timestamp is not specified.
tag: tech-specific
- ref: messaging.rocketmq.message.group
requirement_level:
conditionally_required: If the message type is FIFO.
tag: tech-specific
- ref: messaging.rocketmq.message.type
tag: tech-specific
- ref: messaging.rocketmq.message.tag
tag: tech-specific
- ref: messaging.rocketmq.message.keys
tag: tech-specific
- ref: messaging.rocketmq.consumption_model
tag: tech-specific
- id: messaging.gcp_pubsub
type: attribute_group
stability: experimental
extends: messaging
brief: >
Attributes for Google Cloud Pub/Sub
attributes:
- ref: messaging.gcp_pubsub.message.ordering_key
tag: tech-specific-gcp-pubsub
requirement_level:
conditionally_required: If the message type has an ordering key set.
- ref: messaging.gcp_pubsub.message.delivery_attempt
tag: tech-specific-gcp-pubsub
- ref: messaging.gcp_pubsub.message.ack_deadline
tag: tech-specific-gcp-pubsub
- ref: messaging.gcp_pubsub.message.ack_id
tag: tech-specific-gcp-pubsub
- id: messaging.servicebus
type: attribute_group
extends: messaging
brief: >
Attributes for Azure Service Bus
attributes:
- ref: messaging.servicebus.message.delivery_count
requirement_level:
conditionally_required: If delivery count is available and is bigger than 0.
- ref: messaging.servicebus.message.enqueued_time
- ref: messaging.servicebus.destination.subscription_name
requirement_level:
conditionally_required: If messages are received from the subscription.
- ref: messaging.servicebus.disposition_status
requirement_level:
conditionally_required: if and only if `messaging.operation` is `settle`.
- id: messaging.eventhubs
type: attribute_group
extends: messaging
brief: >
Attributes for Azure Event Hubs
attributes:
- ref: messaging.destination.partition.id
brief: >
String representation of the partition id messages are sent to or received from, unique within the Event Hub.
requirement_level:
conditionally_required: If available.
- ref: messaging.eventhubs.message.enqueued_time
- ref: messaging.eventhubs.consumer.group
requirement_level:
conditionally_required: If not default ("$Default").