Messaging Attributes

19 attributes in this category.17 stable·2 deprecated

19 attributes

Stable Attributes

messaging.batch.message_count

integerScrub: ManualVisibility: PublicOTel: True

The number of messages sent, received, or processed in the scope of the batching operation.

Example10
Changelog
v0.6.0#341Added messaging.batch.message_count attribute
Raw JSON
{
  "key": "messaging.batch.message_count",
  "brief": "The number of messages sent, received, or processed in the scope of the batching operation.",
  "type": "integer",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": 10,
  "changelog": [
    {
      "version": "0.6.0",
      "prs": [
        341
      ],
      "description": "Added messaging.batch.message_count attribute"
    }
  ]
}

messaging.destination.connection

stringScrub: ManualVisibility: PublicOTel: False

The message destination connection.

ExampleBestTopic
Changelog
v0.1.0#127
v0.0.0
Raw JSON
{
  "key": "messaging.destination.connection",
  "brief": "The message destination connection.",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": false,
  "visibility": "public",
  "example": "BestTopic",
  "changelog": [
    {
      "version": "0.1.0",
      "prs": [
        127
      ]
    },
    {
      "version": "0.0.0"
    }
  ]
}

messaging.destination.name

stringScrub: ManualVisibility: PublicOTel: True

The message destination name.

ExampleBestTopic
Changelog
v0.16.0#482Added messaging.destination as an alias
v0.1.0#127
v0.0.0
Raw JSON
{
  "key": "messaging.destination.name",
  "brief": "The message destination name.",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": "BestTopic",
  "alias": [
    "messaging.destination"
  ],
  "changelog": [
    {
      "version": "0.16.0",
      "prs": [
        482
      ],
      "description": "Added messaging.destination as an alias"
    },
    {
      "version": "0.1.0",
      "prs": [
        127
      ]
    },
    {
      "version": "0.0.0"
    }
  ]
}

messaging.destination.partition.id

stringScrub: ManualVisibility: PublicOTel: True

The identifier of the partition messages are sent to or received from, unique within the messaging.destination.name.

Example1
Changelog
v0.19.0#474Added messaging.destination.partition.id attribute
Raw JSON
{
  "key": "messaging.destination.partition.id",
  "brief": "The identifier of the partition messages are sent to or received from, unique within the messaging.destination.name.",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": "1",
  "changelog": [
    {
      "version": "0.19.0",
      "prs": [
        474
      ],
      "description": "Added messaging.destination.partition.id attribute"
    }
  ]
}

messaging.kafka.message.key

stringScrub: ManualVisibility: PublicOTel: True

Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from messaging.message.id in that they're not unique. If the key is null, the attribute MUST NOT be set.

ExamplemyKey
Changelog
v0.19.0#474Added messaging.kafka.message.key attribute
Raw JSON
{
  "key": "messaging.kafka.message.key",
  "brief": "Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from messaging.message.id in that they're not unique. If the key is null, the attribute MUST NOT be set.",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": "myKey",
  "changelog": [
    {
      "version": "0.19.0",
      "prs": [
        474
      ],
      "description": "Added messaging.kafka.message.key attribute"
    }
  ]
}

messaging.kafka.message.tombstone

booleanScrub: ManualVisibility: PublicOTel: True

A boolean that is true if the message is a tombstone.

Exampletrue
Changelog
v0.19.0#474Added messaging.kafka.message.tombstone attribute
Raw JSON
{
  "key": "messaging.kafka.message.tombstone",
  "brief": "A boolean that is true if the message is a tombstone.",
  "type": "boolean",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": true,
  "changelog": [
    {
      "version": "0.19.0",
      "prs": [
        474
      ],
      "description": "Added messaging.kafka.message.tombstone attribute"
    }
  ]
}

messaging.kafka.offset

integerScrub: ManualVisibility: PublicOTel: True

The offset of a record in the corresponding Kafka partition.

Example42
Changelog
v0.19.0#474Added messaging.kafka.offset attribute
Raw JSON
{
  "key": "messaging.kafka.offset",
  "brief": "The offset of a record in the corresponding Kafka partition.",
  "type": "integer",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": 42,
  "changelog": [
    {
      "version": "0.19.0",
      "prs": [
        474
      ],
      "description": "Added messaging.kafka.offset attribute"
    }
  ]
}

messaging.message.body.size

integerScrub: ManualVisibility: PublicOTel: True

The size of the message body in bytes.

Example839
Changelog
v0.4.0#228
v0.0.0
Raw JSON
{
  "key": "messaging.message.body.size",
  "brief": "The size of the message body in bytes.",
  "type": "integer",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": 839,
  "changelog": [
    {
      "version": "0.4.0",
      "prs": [
        228
      ]
    },
    {
      "version": "0.0.0"
    }
  ]
}

messaging.message.conversation_id

stringScrub: ManualVisibility: PublicOTel: True

The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID".

ExampleMyConversationId
Changelog
v0.16.0#468Added messaging.message.conversation_id attribute
Raw JSON
{
  "key": "messaging.message.conversation_id",
  "brief": "The conversation ID identifying the conversation to which the message belongs, represented as a string. Sometimes called \"Correlation ID\".",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": "MyConversationId",
  "changelog": [
    {
      "version": "0.16.0",
      "prs": [
        468
      ],
      "description": "Added messaging.message.conversation_id attribute"
    }
  ]
}

messaging.message.envelope.size

integerScrub: ManualVisibility: PublicOTel: True

The size of the message body and metadata in bytes.

Example1045
Changelog
v0.4.0#228
v0.0.0
Raw JSON
{
  "key": "messaging.message.envelope.size",
  "brief": "The size of the message body and metadata in bytes.",
  "type": "integer",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": 1045,
  "changelog": [
    {
      "version": "0.4.0",
      "prs": [
        228
      ]
    },
    {
      "version": "0.0.0"
    }
  ]
}

messaging.message.id

stringScrub: ManualVisibility: PublicOTel: True

A value used by the messaging system as an identifier for the message, represented as a string.

Examplef47ac10b58cc4372a5670e02b2c3d479
Changelog
v0.1.0#127
v0.0.0
Raw JSON
{
  "key": "messaging.message.id",
  "brief": "A value used by the messaging system as an identifier for the message, represented as a string.",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": "f47ac10b58cc4372a5670e02b2c3d479",
  "changelog": [
    {
      "version": "0.1.0",
      "prs": [
        127
      ]
    },
    {
      "version": "0.0.0"
    }
  ]
}

messaging.message.receive.latency

integerScrub: ManualVisibility: PublicOTel: False

The latency between when the message was published and received.

Example1732847252
Changelog
v0.4.0#228
v0.0.0
Raw JSON
{
  "key": "messaging.message.receive.latency",
  "brief": "The latency between when the message was published and received.",
  "type": "integer",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": false,
  "visibility": "public",
  "example": 1732847252,
  "changelog": [
    {
      "version": "0.4.0",
      "prs": [
        228
      ]
    },
    {
      "version": "0.0.0"
    }
  ]
}

messaging.message.retry.count

integerScrub: ManualVisibility: PublicOTel: False

The amount of attempts to send the message.

Example2
Changelog
v0.4.0#228
v0.0.0
Raw JSON
{
  "key": "messaging.message.retry.count",
  "brief": "The amount of attempts to send the message.",
  "type": "integer",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": false,
  "visibility": "public",
  "example": 2,
  "changelog": [
    {
      "version": "0.4.0",
      "prs": [
        228
      ]
    },
    {
      "version": "0.0.0"
    }
  ]
}

messaging.operation.name

stringScrub: ManualVisibility: PublicOTel: True

The name of the messaging operation being performed

Examplesend
Changelog
v0.11.0#392Added messaging.operation.name attribute
Raw JSON
{
  "key": "messaging.operation.name",
  "brief": "The name of the messaging operation being performed",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": "send",
  "changelog": [
    {
      "version": "0.11.0",
      "prs": [
        392
      ],
      "description": "Added messaging.operation.name attribute"
    }
  ]
}

messaging.operation.type

stringScrub: ManualVisibility: PublicOTel: True

A string identifying the type of the messaging operation

Examplecreate
Changelog
v0.1.0#51#127
Raw JSON
{
  "key": "messaging.operation.type",
  "brief": "A string identifying the type of the messaging operation",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": "create",
  "changelog": [
    {
      "version": "0.1.0",
      "prs": [
        51,
        127
      ]
    }
  ]
}

messaging.rabbitmq.destination.routing_key

stringScrub: ManualVisibility: PublicOTel: True

RabbitMQ message routing key.

ExamplemyKey
Changelog
v0.16.0#468Added messaging.rabbitmq.destination.routing_key attribute
Raw JSON
{
  "key": "messaging.rabbitmq.destination.routing_key",
  "brief": "RabbitMQ message routing key.",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": "myKey",
  "changelog": [
    {
      "version": "0.16.0",
      "prs": [
        468
      ],
      "description": "Added messaging.rabbitmq.destination.routing_key attribute"
    }
  ]
}

messaging.system

stringScrub: ManualVisibility: PublicOTel: True

The messaging system as identified by the client instrumentation.

Exampleactivemq
Changelog
v0.1.0#127
v0.0.0
Raw JSON
{
  "key": "messaging.system",
  "brief": "The messaging system as identified by the client instrumentation.",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": true,
  "visibility": "public",
  "example": "activemq",
  "changelog": [
    {
      "version": "0.1.0",
      "prs": [
        127
      ]
    },
    {
      "version": "0.0.0"
    }
  ]
}

Deprecated Attributes

These attributes are deprecated and should not be used in new code. See each attribute for migration guidance.

messaging.destinationDeprecated

stringScrub: ManualVisibility: PublicOTel: False

The message destination name.

ExampleBestTopic

Use messaging.destination.name instead.

This attribute is being deprecated in favor of messaging.destination.name, which is the OTel-aligned replacement.

Status: backfill

Changelog
v0.16.0#482Added messaging.destination attribute, deprecated in favor of messaging.destination.name
Raw JSON
{
  "key": "messaging.destination",
  "brief": "The message destination name.",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": false,
  "visibility": "public",
  "example": "BestTopic",
  "deprecation": {
    "replacement": "messaging.destination.name",
    "reason": "This attribute is being deprecated in favor of messaging.destination.name, which is the OTel-aligned replacement.",
    "_status": "backfill"
  },
  "alias": [
    "messaging.destination.name"
  ],
  "changelog": [
    {
      "version": "0.16.0",
      "prs": [
        482
      ],
      "description": "Added messaging.destination attribute, deprecated in favor of messaging.destination.name"
    }
  ]
}

messaging.destination_kindDeprecated

stringScrub: ManualVisibility: PublicOTel: False

The kind of message destination.

Exampletopic

No replacement available at this time.

Deprecated from OTEL, which now models the destination kind via messaging.operation.type and messaging.destination.name.

Changelog
v0.19.0#509Added deprecated messaging.destination_kind attribute for parity with legacy OTel instrumentations.
Raw JSON
{
  "key": "messaging.destination_kind",
  "brief": "The kind of message destination.",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": false,
  "visibility": "public",
  "example": "topic",
  "deprecation": {
    "reason": "Deprecated from OTEL, which now models the destination kind via messaging.operation.type and messaging.destination.name.",
    "_status": null
  },
  "changelog": [
    {
      "version": "0.19.0",
      "prs": [
        509
      ],
      "description": "Added deprecated messaging.destination_kind attribute for parity with legacy OTel instrumentations."
    }
  ]
}