Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RabbitMQ instrumentation #327

Closed
EliyaCohen opened this issue Feb 10, 2021 · 4 comments
Closed

RabbitMQ instrumentation #327

EliyaCohen opened this issue Feb 10, 2021 · 4 comments
Labels
feature-request help wanted Extra attention is needed

Comments

@EliyaCohen
Copy link

One common way to integrate services is using RabbitMQ as a message broker. Currently, the python instrumentation does not support tracing for RabbitMQ. It would be of high value to add instrumentation and distributed tracing for message brokers and, in particular, RabbitMQ - one of the most deployed open source message brokers. Not having this integration could be a show-stopper for users.

Solution
A possible solution would be to instrument message publishing and include tracing data in message headers, interpreting those headers when consuming messages to continue the tracing.

To support the maximum number of projects using RabbitMQ, I would recommend to start by adding support for Pika - a widely-used AMQP client library having support for both Python 2.7 and +3.4.

@owais owais added feature-request help wanted Extra attention is needed labels Apr 6, 2021
@alertedsnake
Copy link
Contributor

I wonder if this would be better called either an AMQP instrumentation or specifically a Pika instrumentation, since it can be used with various brokers, and there's also other popular libraries like Kombu.

@adirmatzkin
Copy link

I guess this issue can be closed due to this one - #680
Agree ? @EliyaCohen @alertedsnake @owais

@oxeye-nikolay
Copy link
Member

Hey, I have merged the PR that adds opentelemetry pika instrumentation.
There is also a celery package instrumentation.
Does that solve the issue? @EliyaCohen

@EliyaCohen
Copy link
Author

Yes. Thank you @oxeye-nikolay

nstawski pushed a commit to nstawski/ns-opentelemetry-python-contrib that referenced this issue May 10, 2023
…pen-telemetry#327)

Adding an autoinstrumentation mechanism and a Flask instrumentor (an instrumentor is a class that implements the _instrument and _uninstrument methods).

It works like this:

A console command is defined. This makes it possible to run a command named opentelemetry-auto-instrumentation that will execute this function.

When the opentelemetry-auto-instrumentation command is executed, then the instrument method of the different instrumentors is called, which are made available via an entry-point.

2.In the case of the Flask instrumentor, the original flask.Flask gets replaced with _InstrumentedFlask (in this case, the Flask instrumentor uses monkey patching to perform the instrumentation, nevertheless, monkey patching is not always the method used to do this, so the name instrumentor is preferred over patcher).

Once all instrumentation is enabled, the app is executed.

Co-Authored-By: Mauricio Vásquez <[email protected]>
Co-authored-by: Chris Kleinknecht <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants