Messaging Attributes

26 attributes in this category.17 stable·9 deprecated

26 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
Search AliasHow this attribute is exposed in Sentry search. Query it by this name instead of the attribute key.
Namemessaging.message.body.size
Typebyte
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,
  "search_alias": {
    "name": "messaging.message.body.size",
    "type": "byte"
  },
  "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
nextAdded messaging.conversation_id as an alias
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",
  "alias": [
    "messaging.conversation_id"
  ],
  "changelog": [
    {
      "version": "next",
      "description": "Added messaging.conversation_id as an alias"
    },
    {
      "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
nextAdded messaging.message_id as an alias
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",
  "alias": [
    "messaging.message_id"
  ],
  "changelog": [
    {
      "version": "next",
      "description": "Added messaging.message_id as an alias"
    },
    {
      "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
Search AliasHow this attribute is exposed in Sentry search. Query it by this name instead of the attribute key.
Namemessaging.message.receive.latency
Typemillisecond
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,
  "search_alias": {
    "name": "messaging.message.receive.latency",
    "type": "millisecond"
  },
  "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
nextAdded messaging.operation as an alias
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",
  "alias": [
    "messaging.operation"
  ],
  "changelog": [
    {
      "version": "next",
      "description": "Added messaging.operation as an alias"
    },
    {
      "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.

Changelog
nextAdded messaging.rabbitmq.routing_key as an alias
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",
  "alias": [
    "messaging.rabbitmq.routing_key"
  ],
  "changelog": [
    {
      "version": "next",
      "description": "Added messaging.rabbitmq.routing_key as an alias"
    },
    {
      "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.conversation_idDeprecated

stringScrub: ManualVisibility: PublicOTel: False

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

ExamplesMyConversationId

Use messaging.message.conversation_id instead.

This attribute is being deprecated in favor of messaging.message.conversation_id.

Status: backfill

Changelog
next#581Added messaging.conversation_id attribute
Raw JSON
{
  "key": "messaging.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": false,
  "visibility": "public",
  "examples": [
    "MyConversationId"
  ],
  "deprecation": {
    "replacement": "messaging.message.conversation_id",
    "reason": "This attribute is being deprecated in favor of messaging.message.conversation_id.",
    "_status": "backfill"
  },
  "alias": [
    "messaging.message.conversation_id"
  ],
  "changelog": [
    {
      "version": "next",
      "prs": [
        581
      ],
      "description": "Added messaging.conversation_id attribute"
    }
  ]
}

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."
    }
  ]
}

messaging.message_idDeprecated

stringScrub: ManualVisibility: PublicOTel: False

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

Examples452a7c7c7c7048c2f887f0e7

Use messaging.message.id instead.

This attribute is being deprecated in favor of messaging.message.id.

Status: backfill

Changelog
next#581Added messaging.message_id attribute
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": false,
  "visibility": "public",
  "examples": [
    "452a7c7c7c7048c2f887f0e7"
  ],
  "deprecation": {
    "replacement": "messaging.message.id",
    "reason": "This attribute is being deprecated in favor of messaging.message.id.",
    "_status": "backfill"
  },
  "alias": [
    "messaging.message.id"
  ],
  "changelog": [
    {
      "version": "next",
      "prs": [
        581
      ],
      "description": "Added messaging.message_id attribute"
    }
  ]
}

messaging.operationDeprecated

stringScrub: ManualVisibility: PublicOTel: False

The name of the messaging operation being performed.

Examplespublish

Use messaging.operation.name instead.

This attribute is being deprecated in favor of messaging.operation.name.

Status: backfill

Changelog
next#581Added messaging.operation attribute
Raw JSON
{
  "key": "messaging.operation",
  "brief": "The name of the messaging operation being performed.",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": false,
  "visibility": "public",
  "examples": [
    "publish"
  ],
  "deprecation": {
    "replacement": "messaging.operation.name",
    "reason": "This attribute is being deprecated in favor of messaging.operation.name.",
    "_status": "backfill"
  },
  "alias": [
    "messaging.operation.name"
  ],
  "changelog": [
    {
      "version": "next",
      "prs": [
        581
      ],
      "description": "Added messaging.operation attribute"
    }
  ]
}

messaging.protocolDeprecated

stringScrub: ManualVisibility: PublicOTel: False

OSI application layer or non-OSI equivalent.

ExamplesAMQP

Use network.protocol.name instead.

This attribute is being deprecated in favor of network.protocol.name.

Status: backfill

Changelog
next#581Added messaging.protocol attribute
Raw JSON
{
  "key": "messaging.protocol",
  "brief": "OSI application layer or non-OSI equivalent.",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": false,
  "visibility": "public",
  "examples": [
    "AMQP"
  ],
  "deprecation": {
    "replacement": "network.protocol.name",
    "reason": "This attribute is being deprecated in favor of network.protocol.name.",
    "_status": "backfill"
  },
  "alias": [
    "network.protocol.name",
    "net.protocol.name",
    "mcp.resource.protocol"
  ],
  "changelog": [
    {
      "version": "next",
      "prs": [
        581
      ],
      "description": "Added messaging.protocol attribute"
    }
  ]
}

messaging.protocol_versionDeprecated

stringScrub: ManualVisibility: PublicOTel: False

The actual version of the protocol used for network communication.

Examples0.9.1

Use network.protocol.version instead.

This attribute is being deprecated in favor of network.protocol.version.

Status: backfill

Changelog
next#581Added messaging.protocol_version attribute
Raw JSON
{
  "key": "messaging.protocol_version",
  "brief": "The actual version of the protocol used for network communication.",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": false,
  "visibility": "public",
  "examples": [
    "0.9.1"
  ],
  "deprecation": {
    "replacement": "network.protocol.version",
    "reason": "This attribute is being deprecated in favor of network.protocol.version.",
    "_status": "backfill"
  },
  "alias": [
    "network.protocol.version",
    "http.flavor",
    "net.protocol.version"
  ],
  "changelog": [
    {
      "version": "next",
      "prs": [
        581
      ],
      "description": "Added messaging.protocol_version attribute"
    }
  ]
}

messaging.rabbitmq.routing_keyDeprecated

stringScrub: ManualVisibility: PublicOTel: False

RabbitMQ message routing key.

ExamplesmyKey

Use messaging.rabbitmq.destination.routing_key instead.

This attribute is being deprecated in favor of messaging.rabbitmq.destination.routing_key.

Status: backfill

Changelog
next#581Added messaging.rabbitmq.routing_key attribute
Raw JSON
{
  "key": "messaging.rabbitmq.routing_key",
  "brief": "RabbitMQ message routing key.",
  "type": "string",
  "apply_scrubbing": {
    "key": "manual"
  },
  "is_in_otel": false,
  "visibility": "public",
  "examples": [
    "myKey"
  ],
  "deprecation": {
    "replacement": "messaging.rabbitmq.destination.routing_key",
    "reason": "This attribute is being deprecated in favor of messaging.rabbitmq.destination.routing_key.",
    "_status": "backfill"
  },
  "alias": [
    "messaging.rabbitmq.destination.routing_key"
  ],
  "changelog": [
    {
      "version": "next",
      "prs": [
        581
      ],
      "description": "Added messaging.rabbitmq.routing_key attribute"
    }
  ]
}

messaging.urlDeprecated

stringScrub: AutoVisibility: PublicOTel: False

The connection string of the messaging broker.

Examplesamqp://guest:guest@localhost:5672

Use url.full instead.

This attribute is being deprecated in favor of url.full.

Status: backfill

Changelog
next#581Added messaging.url attribute
Raw JSON
{
  "key": "messaging.url",
  "brief": "The connection string of the messaging broker.",
  "type": "string",
  "apply_scrubbing": {
    "key": "auto"
  },
  "is_in_otel": false,
  "visibility": "public",
  "examples": [
    "amqp://guest:guest@localhost:5672"
  ],
  "deprecation": {
    "replacement": "url.full",
    "reason": "This attribute is being deprecated in favor of url.full.",
    "_status": "backfill"
  },
  "alias": [
    "url.full",
    "http.url",
    "url",
    "aws.request.url"
  ],
  "changelog": [
    {
      "version": "next",
      "prs": [
        581
      ],
      "description": "Added messaging.url attribute"
    }
  ]
}