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

Add sentry integration-step to worker prerun celery signal #53

Merged
merged 6 commits into from Dec 3, 2020

Conversation

sondrelg
Copy link
Member

@sondrelg sondrelg commented Dec 3, 2020

PR adds functionality for adding Sentry transaction_id's in the new Celery integration.


I'm not sure why the one test is failing @JonasKs - perhaps you could take a look at it? Also, feel free to change changelog/docs as well if there's anything you would prefer to word differently.

@sondrelg sondrelg self-assigned this Dec 3, 2020
@sondrelg sondrelg requested a review from JonasKs December 3, 2020 17:15
@sondrelg sondrelg added the enhancement New feature or enhancement of the code label Dec 3, 2020
@sondrelg sondrelg marked this pull request as ready for review December 3, 2020 17:23
Copy link
Member

@JonasKs JonasKs left a comment

Choose a reason for hiding this comment

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

🍻

I fixed the failing test, and fixed made sure the test_dont_set_transaction_id actually passes for the right reasons. The tests failed because of propagate=False, caplog can't catch those logs. There's two solutions, either override_settings and change the Django setting, or simply do this:

logger = logging.getLogger('django_guid.celery')
logger.addHandler(caplog.handler)

Also removed a file called tests/unit/.coverage.Sondres-MBP.88325.438243, FYI!

@sondrelg sondrelg merged commit c70b8c6 into master Dec 3, 2020
@sondrelg sondrelg deleted the celery-sentry branch December 3, 2020 20:31
@JonasKs JonasKs mentioned this pull request Dec 3, 2020
JonasKs added a commit that referenced this pull request Dec 3, 2020
3.2.0 version release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants