Skip to content

feat(celery): Set "messaging.system" on span#3024

Merged
szokeasaurusrex merged 1 commit into
szokeasaurusrex/celery-retry-countfrom
szokeasaurusrex/celery-messaging-system
May 15, 2024
Merged

feat(celery): Set "messaging.system" on span#3024
szokeasaurusrex merged 1 commit into
szokeasaurusrex/celery-retry-countfrom
szokeasaurusrex/celery-messaging-system

Conversation

@szokeasaurusrex

@szokeasaurusrex szokeasaurusrex commented Apr 26, 2024

Copy link
Copy Markdown
Member

@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/celery-queue-consumer-default-exchange branch from f1671f5 to 67e2531 Compare April 30, 2024 15:16
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/celery-messaging-system branch from 45e8f3b to cd65142 Compare April 30, 2024 15:49
@szokeasaurusrex
szokeasaurusrex changed the base branch from szokeasaurusrex/celery-queue-consumer-default-exchange to szokeasaurusrex/celery-messaging-id April 30, 2024 15:50
@szokeasaurusrex szokeasaurusrex self-assigned this Apr 30, 2024
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/celery-messaging-system branch 4 times, most recently from 55ba199 to a09959b Compare May 3, 2024 12:07
events = capture_events()

# Does not need to be a real URL, since we use always eager
celery.conf.broker_url = f"{system}://example.com" # noqa: E231

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flake8 is giving a false positive E231 on the : in the string when running in CI

@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/celery-messaging-system branch 4 times, most recently from 92846d8 to 4af0ecb Compare May 7, 2024 12:59
sentry_init(
integrations=[CeleryIntegration(propagate_traces=propagate_traces)],
**kwargs
**kwargs,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The formatter is adding this comment, and if I try to commit with the comma remove, CI fails. So I will keep it here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I had that too at some point!

@szokeasaurusrex szokeasaurusrex changed the title WIP: feat(celery): Set "messaging.system" on span feat(celery): Set "messaging.system" on span May 7, 2024
@szokeasaurusrex
szokeasaurusrex marked this pull request as ready for review May 7, 2024 13:05
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/celery-messaging-id branch from d5a29b9 to df18b49 Compare May 7, 2024 15:56
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/celery-messaging-system branch from 4af0ecb to fa16def Compare May 7, 2024 16:00
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/celery-messaging-id branch from df18b49 to 9af5324 Compare May 10, 2024 12:30
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/celery-messaging-system branch from fa16def to 6d791c9 Compare May 10, 2024 12:30

@edwardgou-sentry edwardgou-sentry left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked for me in testing

@antonpirker antonpirker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Set the "messaging.system" data on the "queue.process" span in the Celery integration. The messaging.system span data attribute should be set to the Celery broker being used, e.g. "amqp" for RabbitMQ, "redis" for Redis, and "sqs" for Amazon SQS. Also, add tests for this feature.

ref #2951
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/celery-messaging-system branch from 6d791c9 to a02eb9c Compare May 15, 2024 12:22
@szokeasaurusrex
szokeasaurusrex force-pushed the szokeasaurusrex/celery-messaging-id branch from 9af5324 to 68332d8 Compare May 15, 2024 12:22
Base automatically changed from szokeasaurusrex/celery-messaging-id to szokeasaurusrex/celery-retry-count May 15, 2024 12:43
@szokeasaurusrex
szokeasaurusrex merged commit a02eb9c into szokeasaurusrex/celery-retry-count May 15, 2024
@szokeasaurusrex
szokeasaurusrex deleted the szokeasaurusrex/celery-messaging-system branch May 15, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants