Messaging Attributes

19 attributes in this category. 17 stable · 2 deprecated

19 attributes

Stable Attributes

messaging.batch.message_count

integer Scrub: Manual Visibility: Public OTel: True

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

Example 10
Changelog
v0.6.0 #341 Added 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

string Scrub: Manual Visibility: Public OTel: False

The message destination connection.

Example BestTopic
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

string Scrub: Manual Visibility: Public OTel: True

The message destination name.

Example BestTopic
Changelog
v0.16.0 #482 Added 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

string Scrub: Manual Visibility: Public OTel: True

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

Example 1
Changelog
next #474 Added 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": "next",
      "prs": [
        474
      ],
      "description": "Added messaging.destination.partition.id attribute"
    }
  ]
}

messaging.kafka.message.key

string Scrub: Manual Visibility: Public OTel: 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.

Example myKey
Changelog
next #474 Added 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": "next",
      "prs": [
        474
      ],
      "description": "Added messaging.kafka.message.key attribute"
    }
  ]
}

messaging.kafka.message.tombstone

boolean Scrub: Manual Visibility: Public OTel: True

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

Example true
Changelog
next #474 Added 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": "next",
      "prs": [
        474
      ],
      "description": "Added messaging.kafka.message.tombstone attribute"
    }
  ]
}

messaging.kafka.offset

integer Scrub: Manual Visibility: Public OTel: True

The offset of a record in the corresponding Kafka partition.

Example 42
Changelog
next #474 Added 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": "next",
      "prs": [
        474
      ],
      "description": "Added messaging.kafka.offset attribute"
    }
  ]
}

messaging.message.body.size

integer Scrub: Manual Visibility: Public OTel: True

The size of the message body in bytes.

Example 839
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

string Scrub: Manual Visibility: Public OTel: True

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

Example MyConversationId
Changelog
v0.16.0 #468 Added 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

integer Scrub: Manual Visibility: Public OTel: True

The size of the message body and metadata in bytes.

Example 1045
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

string Scrub: Manual Visibility: Public OTel: True

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

Example f47ac10b58cc4372a5670e02b2c3d479
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

integer Scrub: Manual Visibility: Public OTel: False

The latency between when the message was published and received.

Example 1732847252
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

integer Scrub: Manual Visibility: Public OTel: False

The amount of attempts to send the message.

Example 2
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

string Scrub: Manual Visibility: Public OTel: True

The name of the messaging operation being performed

Example send
Changelog
v0.11.0 #392 Added 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

string Scrub: Manual Visibility: Public OTel: True

A string identifying the type of the messaging operation

Example create
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

string Scrub: Manual Visibility: Public OTel: True

RabbitMQ message routing key.

Example myKey
Changelog
v0.16.0 #468 Added 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

string Scrub: Manual Visibility: Public OTel: True

The messaging system as identified by the client instrumentation.

Example activemq
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.destination Deprecated

string Scrub: Manual Visibility: Public OTel: False

The message destination name.

Example BestTopic

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 #482 Added 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_kind Deprecated

string Scrub: Manual Visibility: Public OTel: False

The kind of message destination.

Example topic

No replacement available at this time.

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

Changelog
next Added 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": "next",
      "description": "Added deprecated messaging.destination_kind attribute for parity with legacy OTel instrumentations."
    }
  ]
}