-
Notifications
You must be signed in to change notification settings - Fork 774
Update celery instrumentation to follow semantic conventions #3712
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
base: main
Are you sure you want to change the base?
Conversation
…-contrib into semconv-celery
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.
Lgtm; maintainers will also have a look
@@ -20,7 +20,9 @@ | |||
from celery import registry # pylint: disable=no-name-in-module | |||
from celery.app.task import Task | |||
|
|||
from opentelemetry.semconv.trace import SpanAttributes | |||
from opentelemetry.semconv._incubating.attributes import ( | |||
messaging_attributes as SpanAttributes, |
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.
That makes it harder when grepping for the old SpanAttributes module users, please convert the callers from SpanAttributes to messaging_attributes
) | ||
|
||
meter_provider = kwargs.get("meter_provider") | ||
meter = get_meter( | ||
__name__, | ||
__version__, | ||
meter_provider, | ||
schema_url="https://opentelemetry.io/schemas/1.11.0", | ||
schema_url="https://opentelemetry.io/schemas/1.37.0", |
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.
Semconvs suggest to make the move to a newer semconv opt-in via OTEL_SEMCONV_STABILITY_OPT_IN
, see
https://opentelemetry.io/docs/specs/semconv/messaging/
We have already some tooling in place for handling these in opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py
Description
Bump celery schema version from 1.11.0 to 1.37.0 and update the instrumentation to follow semantic conventions.
Fixes #1640
Breaking Changes:
messaging.destination
bymessaging.destination.name
messaging.conversation_id
bymessaging.message.conversation_id
messaging.destination_kind
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.