-
Notifications
You must be signed in to change notification settings - Fork 205
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
messaging: add celery to messaging system values #1954
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Celery seems to be a background task processing library rather than a messaging system. Messaging semantic conventions might not really apply to it since they are focused on common messaging scenarios involving network calls. I would imaging celery integrations for specific systems (like RabbitMQ) to either leverage underlying instrumentation for this library or, if celery needs to be instrumented, it should set the messaging system to the actual broker configured by the user.
We already have a celery instrumentation but we were not setting the |
yep, redis would fit. |
I believe that since users typically configure the underlying broker (e.g., Redis, RabbitMQ) through Celery, the Python auto-instrumentation should extract as much relevant information as possible from the Celery instrumentation. Currently, however, certain details, such as the broker URL are missing from the context. Ideally, if the broker URL can be identified, it should be used to populate the If the sem conv says, that PTAL at open-telemetry/opentelemetry-python-contrib#3265 (comment) I'm not sure if there's an actual way to extract broker info from the context. |
@shivanshuraj1333 @xrmx I replied in the https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3265/files#r1981937391 - looking into existing instrumentation I don't believe it has a significant intersection with messaging semconv - it only populates message id, conversation id and destination name from messaging, but populates a lot of celery-specific attributes. I don't see how setting messaging.system would be helpful - backends will assume that spans follow messaging semconv, but these spans would lack the details. I'm suggesting to think about generic task processing (which maybe in-process) provided by celery as a layer on top of messaging semconv. |
what could be the attribute name for it? any suggestions? |
created #1963 - we should document the limitations of messaging semconv. //cc @open-telemetry/semconv-messaging-approvers |
could you elaborate? attribute name for what? |
if you run a demo application like this, you'd see attributes coming like below, which captures all the otel-python instrumented celery specific attributes:
Now I see attributes with Now one way to know that task processor |
Changes
Celery site here:
https://docs.celeryq.dev/en/stable/index.html
And we have an instrumentation for celery in opentelemetry-python-contrib.
Merge requirement checklist
[chore]