This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/java-agent/instrumentation/rocketmq-client-4.8.md.

Apache RocketMQ Client - Remoting Protocol

OpenTelemetry Java agent instrumentation

This instrumentation enables messaging spans for Apache RocketMQ message producers and consumers using the Remoting Protocol.

  • Name: rocketmq-client-4.8
  • Scope: io.opentelemetry.rocketmq-client-4.8
  • Target versions: org.apache.rocketmq:rocketmq-client:[4.0.0,)
  • Library: https://rocketmq.apache.org/

Telemetry

When default

Spans

Span kindAttributes
CONSUMERmessaging.destination.name (STRING), messaging.message.body.size (LONG), messaging.message.id (STRING), messaging.operation (STRING), messaging.system (STRING)
PRODUCERmessaging.destination.name (STRING), messaging.message.id (STRING), messaging.operation (STRING), messaging.system (STRING)

When otel.instrumentation.rocketmq-client.experimental-span-attributes=true

Spans

Span kindAttributes
CONSUMERmessaging.destination.name (STRING), messaging.message.body.size (LONG), messaging.message.id (STRING), messaging.operation (STRING), messaging.rocketmq.broker_address (STRING), messaging.rocketmq.message.tag (STRING), messaging.rocketmq.queue_id (LONG), messaging.rocketmq.queue_offset (LONG), messaging.system (STRING)
PRODUCERmessaging.destination.name (STRING), messaging.message.id (STRING), messaging.operation (STRING), messaging.rocketmq.broker_address (STRING), messaging.rocketmq.message.tag (STRING), messaging.rocketmq.send_result (STRING), messaging.system (STRING)

When otel.semconv-stability.preview=messaging

Spans

Span kindAttributes
CLIENTerror.type (STRING), messaging.batch.message_count (LONG), messaging.destination.name (STRING), messaging.operation.name (STRING), messaging.operation.type (STRING), messaging.rocketmq.namespace (STRING), messaging.system (STRING)
CONSUMERerror.type (STRING), messaging.batch.message_count (LONG), messaging.consumer.group.name (STRING), messaging.destination.name (STRING), messaging.message.id (STRING), messaging.operation.name (STRING), messaging.operation.type (STRING), messaging.rocketmq.namespace (STRING), messaging.system (STRING)
PRODUCERmessaging.destination.name (STRING), messaging.message.id (STRING), messaging.operation.name (STRING), messaging.operation.type (STRING), messaging.rocketmq.namespace (STRING), messaging.system (STRING)

Configuration

OptionTypeDefaultDescription
otel.instrumentation.common.messaging.message-create-spans.enabledbooleantrueProvides the default for whether to create a producer span for each eligible message in a batch send when stable messaging semantic conventions are enabled. An instrumentation-specific setting takes precedence.
otel.instrumentation.messaging.experimental.capture-headerslistDeprecated: use otel.instrumentation.common.messaging.headers.included instead. Ignored without a warning under v3-preview; may be removed in a later minor release and will be removed no later than 3.0. A comma-separated list of header names to capture as span attributes. It does not support glob patterns: an entry containing * or ? is ignored with a warning, and every other entry is matched as a literal header name.
otel.instrumentation.messaging.experimental.headers.excludedlistDeprecated: use otel.instrumentation.common.messaging.headers.excluded instead. Ignored without a warning under v3-preview; may be removed in a later minor release and will be removed no later than 3.0.
otel.instrumentation.messaging.experimental.headers.includedlistDeprecated: use otel.instrumentation.common.messaging.headers.included instead. Ignored without a warning under v3-preview; may be removed in a later minor release and will be removed no later than 3.0.
otel.instrumentation.common.messaging.headers.excludedlistA comma-separated list of case-sensitive message header name glob patterns to exclude from span attributes. ? matches one character and * matches zero or more characters. Excluded patterns take precedence over included patterns. An absent or empty selector captures no headers; an exclude-only selector captures every header not excluded, which may expose sensitive information.
otel.instrumentation.common.messaging.headers.includedlistA comma-separated list of case-sensitive message header name glob patterns to capture as span attributes. ? matches one character and * matches zero or more characters. Excluded patterns take precedence over included patterns. An absent or empty selector captures no headers; an exclude-only selector captures every header not excluded.
otel.instrumentation.rocketmq-client.experimental-span-attributesbooleanfalseEnables capturing experimental span attributes messaging.rocketmq.message.tag, messaging.rocketmq.broker_address, messaging.rocketmq.send_result, messaging.rocketmq.queue_id, and messaging.rocketmq.queue_offset.
otel.instrumentation.rocketmq-client.message-create-spans.enabledbooleantrueEnables per-message Create spans for batch sends when stable messaging semantic conventions are enabled. Overrides the common messaging setting. Disabling this retains Send spans and context propagation and does not affect single-message sends.

Data

  • JSON (latest): /data/javaagent/instrumentations/rocketmq-client-4.8/latest.json
  • JSON (pinned): /data/javaagent/instrumentations/rocketmq-client-4.8/rocketmq-client-4.8-91510094bd90.json
  • Explore: /java-agent/instrumentation/rocketmq-client-4.8