open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.92k stars 2.28k forks source link

New component: RabbitMQ Exporter #28891

Closed swar8080 closed 2 months ago

swar8080 commented 10 months ago

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

Common Configuration

The below is copied from the Pulsar exporter since it seems relevant to this exporter as well

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

crobert-1 commented 10 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!

atoulme commented 10 months ago

Confirm this is not a vendor-specific component, from what I can tell.

atoulme commented 10 months ago

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.

swar8080 commented 10 months ago

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

Other possible enhancements

github-actions[bot] commented 7 months ago

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.

atoulme commented 6 months ago

@swar8080 I'd be happy to sponsor this component and help it land in contrib.

romerod commented 5 months ago

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?

swar8080 commented 5 months ago

@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

romerod commented 5 months ago

Thanks @swar8080, understood this, but which receiver can be used to receive the telemetry on the receiving side?

swar8080 commented 5 months ago

@romerod gotcha, so there's no component for pulling messages from rabbitmq. This component is just for pushing messages to rabbitmq

cwegener commented 4 months ago

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.

gauthierjf commented 2 months ago

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?

swar8080 commented 2 months ago

Hi @gauthierjf, rabbitmq exporter is available starting in 0.104.0

crobert-1 commented 2 months ago

@swar8080: Since this component has now been shipped should we close this issue?

alrz commented 2 months ago

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.