Public documentation
Documentation indexRead as MarkdownRabbitMQ
Trace publish and consume operations inside applications. Use the Collector
rabbitmq receiver separately for metrics from the Management HTTP API.
Contrib 0.160.0 marks the receiver's metrics signal beta. It reads queue/node
statistics and does not consume message payloads or create messaging spans.
Instrument the applications
For a supported RabbitMQ Java client, follow the Java guide and attach the agent to producer and consumer processes. Other runtimes need instrumentation for their specific AMQP library; start from the language guides.
Publish one non-sensitive message to a test queue and acknowledge it through the normal instrumented consumer. Preserve propagation metadata in message headers. An operation that publishes successfully does not prove the consumer finished its business work. Inspect both sides and their timing or span links.
Enable monitoring access
On a self-managed node, enable the Management plugin as the RabbitMQ operator:
rabbitmq-plugins enable rabbitmq_management
Create an otel_monitor user through your protected administration workflow.
Give it the monitoring tag and empty messaging permissions for each intended
virtual host. For a vhost named /:
rabbitmqctl set_user_tags otel_monitor monitoring
rabbitmqctl set_permissions --vhost / otel_monitor '^$' '^$' '^$'
This lets the user inspect monitoring data without permission to publish, consume, or configure queue objects. Configure a TLS Management listener and permit access only from the monitoring network. The example assumes its port is 15671; enabling the plugin alone does not create this TLS listener.
Add the receiver
Merge this partial fragment into common setup, preserving
existing pipelines. Requires Contrib's rabbitmq and resource components.
receivers:
rabbitmq/orders:
endpoint: https://rabbitmq.internal:15671
username: otel_monitor
password: ${env:RABBITMQ_MONITOR_PASSWORD}
collection_interval: 30s
tls:
ca_file: /etc/otel/certs/rabbitmq-ca.pem
metrics:
rabbitmq.node.mem_used:
enabled: true
processors:
resource/rabbitmq:
attributes:
- key: service.name
value: rabbitmq-orders
action: upsert
- key: deployment.environment.name
value: production
action: upsert
service:
pipelines:
metrics/rabbitmq:
receivers: [rabbitmq/orders]
processors: [memory_limiter, resource/rabbitmq, batch]
exporters: [otlp_http/corridora]
Queue metrics are enabled by default; the sample opts in to one node metric. The receiver README explicitly lists RabbitMQ 3.8/3.9. Treat newer versions as a compatibility test requirement, rather than inferring current-version support from the receiver's beta status. Inspect returned HTTP API fields after upgrades.
Verify
From the Collector network, query the Management API. curl --user with only a
username prompts for the password:
curl --fail --cacert /etc/otel/certs/rabbitmq-ca.pem \
--user otel_monitor https://rabbitmq.internal:15671/api/queues
Expect JSON containing queues from the permitted vhosts. Verify /api/nodes
similarly because the sample enables a node metric. A 200 response containing
no queues can be a permission or inventory issue rather than a transport failure.
Validate the Collector, then inspect rabbitmq. metrics under rabbitmq-orders
after two intervals, including rabbitmq.node.mem_used. Publish and acknowledge
a controlled message; compare queue counts with the Management API and inspect
the application spans independently. Queue counters can change between scrapes.
For failures, check the Management endpoint rather than the AMQP port, vhost permissions, monitoring tag, and CA mount. Collect broker logs through the log-file route. Finish verification.
Source basis: RabbitMQ receiver README and metadata, Contrib 0.160.0; RabbitMQ Management Plugin monitoring-only access; OpenTelemetry Java supported libraries. Reviewed 2026-09-28.