snok / django-guid

Inject an ID into every log message from a Django request. ASGI compatible, integrates with Sentry, and works with Celery

Home Page:https://django-guid.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Port celery support for django-guid 2.2

maximdunavicher opened this issue · comments

Port celery support for django-guid 2.2

Hi,

If this is a request to back port the Celery integration to 2.2, we can look into that/PR to the back port branch welcome.

How ever, because it’s impossible to control which version google directs to, it’s very (!) common to only have documentation for the latest release. If you’re not using the latest version of a library, you should browse the git repository for the given version you use, and look in the docs folder.

Here’s the docs for integrations, on the 2.2 branch: https://github.com/snok/django-guid/blob/2.2-backport-branch/docs/integrations.rst

@JonasKs you are probably right about the documentation part.
If it's possible to port back to 2.2 that would be great - I think most big Django projects probably didn't upgrade to Django 3 yet (my project as an example) and celery integration is critical I think this will probably help a lot of people.

I'd be happy to review a pull request for a back port if you'd like to submit one. 😊

I'd love to, but I lack a lot of the background needed to do it correctly, got any advice for what should be done besides a cherry-pick? what should I check?

If you don't want to do the entire backport, you can follow the guidelines on how to write your own integration, and just copy/paste code here and into your own project.

Otherwise, yes, cherry picking the implementation and tests would be one way to do it. You'll have to make sure codecov stays at 100% and that all tests pass.

@JonasKs, sorry it took me so long to get to this, I finally have some time to spend on this.
Assuming I did the cherry-pick and resolved all the conflicts, how can I run the tests and coverage check to verify I didn't break anything?

Hi!

See contributing.rst for pre-commit and workflows for how tests are run 😊

Django 2.2 has end of life in 2 months, so I’ll close this.