Skip to content

Conversation

mriamah
Copy link

@mriamah mriamah commented Aug 25, 2025

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:

  • Replaced attribute messaging.destination by messaging.destination.name
  • Replaced messaging.conversation_id by messaging.message.conversation_id
  • Removed deprecated attribute messaging.destination_kind

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

  • tox -e py39-test-instrumentation-celery

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

Copy link

linux-foundation-easycla bot commented Aug 25, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@mriamah mriamah marked this pull request as draft August 25, 2025 11:03
@mriamah mriamah marked this pull request as ready for review September 1, 2025 12:40
@mriamah mriamah requested a review from a team as a code owner September 1, 2025 12:40
Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi left a 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

@tammy-baylis-swi tammy-baylis-swi moved this to Easy to review / merge / close in @xrmx's Python PR digest Sep 2, 2025
@@ -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,
Copy link
Contributor

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",
Copy link
Contributor

@xrmx xrmx Sep 10, 2025

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

@xrmx xrmx moved this from Easy to review / merge / close to Reviewed PR that needs fixing in @xrmx's Python PR digest Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Reviewed PRs that need fixes
Development

Successfully merging this pull request may close these issues.

Make sure celery instrumentation follows semantic conventions
3 participants