Closed swar8080 closed 4 months ago
Sounds like a valid use case and component to me! Please review all the requirements of adding a new component.
From here you'll need a sponsor to be able to move forward. You can join the Collector sig meetings and add this issue to the agenda of the Google doc to get more attention here.
As shared in another component proposal, not all components end up being sponsored, so feel free to go ahead and implement this in your own repository if you're not able to get much traction here soon.
Thanks for the proposal and willingness to contribute!
Confirm this is not a vendor-specific component, from what I can tell.
How much of this exporter would you be able to calc after the kafka exporter? Ideally it could be a thin client and use encoding extensions to do most of the heavy lifting, making maintenance easier.
Thanks @crobert-1 and @atoulme. I was assuming this wouldn't get sponsored and started implementing it just as a learning exercise. Here's what I have so far. This implementation might have optimizations and configuration options that aren't worth the complexity for an alpha component though.
I'll list out the possible scope to help decide if it's worth sponsoring/maintaining. From there I could break the implementation into smaller tasks / pull requests. Lmk what you suggest
Possible MVP
confirm_mode=false
, meaning the collector doesn't wait for asynchronous confirmation that the broker received the message.Other possible enhancements
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers
. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
@swar8080 I'd be happy to sponsor this component and help it land in contrib.
Is this the Exporter Part of https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/10592? The existing RabbitMQ receiver can't be used to receive the exported data, right or am I missing something?
@romerod yep, same idea as the issue you mentioned. This component is for sending telemetry to rabbitmq. The rabbitmqreceiver is for collecting rabbitmq usage metrics
Thanks @swar8080, understood this, but which receiver can be used to receive the telemetry on the receiving side?
@romerod gotcha, so there's no component for pulling messages from rabbitmq. This component is just for pushing messages to rabbitmq
This is an exciting component! I am in a similar situation like @romerod I'd be interested in using RabbitMQ queues that are distributed around the edge with this exporter to export OTEL in a fashion that decouples the direct OTLP protocol connection. And then I want to have a central location that goes to all the "edge" locations and collects the OTEL data from each RabbitMQ instance, for which there currently is no rabbitmq receiver.
This exporter is a good solution for our IoT edge solution. I have tried to setup the rabbitmq exporter with version 0.103.0 without luck It is not part of the valid exporters. Maybe I did something wrong. If not, when this exporter will be part of the distribution?
Hi @gauthierjf, rabbitmq exporter is available starting in 0.104.0
@swar8080: Since this component has now been shipped should we close this issue?
Is there a proposal to enable logs for rabbitmq receiver? I'd imagine that would produce a log per each message optionally including the body with a size limit.
Overiew
Use-cases
Similar use cases as other durable messaging system exporters like Kafka and Pulsar. This could help meet teams where they are that want to do custom telemetry processing but only have access to RabbitMQ
Why prioritize RabbitMQ and not some other queue?
Other options considered
SQS SQS is also popular but i'm assuming someone from AWS would need to own/maintain the component
AMQP 1.0 Protocol This would allow supporting other queues like ActiveMQ with a Go client library maintained by microsoft. However:
STOMP Protocol STOMP would also allow supporting other queues like ActiveMQ, however:
JMS A JMS exporter was requested in https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27258 because many queues support it
However, JMS is an API and not a wire-protocol. The implementation of the protocol seems specific to each queue
Example configuration for the component
Unique Configuration
publisher
routing_key
(default = otlp_spans for traces, otlp_metrics for metrics, otlp_logs for logs): The AMQP routing key for the message, which will be delivered to a queue with that name (using the amq.direct exchange)confirm_mode
(default = true) whether to wait for confirmation that RabbitMQ successfully received or is unable to process a message. This improves the accuracy of collector metrics on unprocessed data. The tradeoff is lower throughput having to wait for asynchronous confirmation.durable
(default = true) whether to instruct RabbitMQ to durably persist messages on disk. Whenpublisher.confirm_mode
istrue
, this may delay confirmation by a few hundred milliseconds , decreasing the pipeline's throughput.endpoint
(default =rabbit://localhost:5672): The url of the RabbitMQ broker.Common Configuration
The below is copied from the Pulsar exporter since it seems relevant to this exporter as well
auth
/tls
settings (TODO)encoding
of messages set to RabbitMQ (TODO, need to research current OTEL best-practices)timeout
: timeout for sending an individual messageconnection_timeout
: timeout for the establishing a connection to the broker and creating an AMQP channelretry_on_failure
enabled
:initial_interval
: Time to wait after the first failure before retrying; ignored ifenabled
isfalse
max_interval
(default = ?): Is the upper bound on backoff; ignored ifenabled
isfalse
max_elapsed_time
(default = ?): Is the maximum amount of time spent trying to send a batch; ignored ifenabled
isfalse
sending_queue
enabled
(default = true)num_consumers
: Number of consumers that dequeue batches; ignored ifenabled
isfalse
queue_size
Maximum number of batches kept in memory before dropping data; ignored ifenabled
isfalse
; User should calculate this asnum_seconds * requests_per_second
where:num_seconds
is the number of seconds to buffer in case of a backend outagerequests_per_second
is the average number of requests per seconds.Telemetry data types supported
Logs, metrics, and traces
Is this a vendor-specific component?
Code Owner(s)
@swar8080
Sponsor (optional)
@atoulme
Additional context
Is this considered a vendor-specific component that needs to be implemented/maintained by the RabbitMQ team? If it's not then i'm happy to implement this!
There's some more research needed for the design but i'll wait to see if this accepted/sponsored before going down that rabbit hole. Let me know if any extra info would help though