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

Enable python and django monitoring in kafka consumers and celery workers #785

Open
robrap opened this issue Aug 28, 2024 · 0 comments
Open

Comments

@robrap
Copy link
Contributor

robrap commented Aug 28, 2024

This probably should be two separate tasks (kafka consumers and celery workers), but adding one to start to capture the ideas.

Implementation thoughts:

  • In Datadog, I'm not sure if the Python version can be seen manually. This might need to be asked in a DD support ticket.
  • These changes may highlight where DatadogBackend is missing in other services, and thus they might be missing all custom span tags. So this dashboard might serve as a useful verification that all services are set up correctly.
    • Of course we'd need to expand the operation_name on this dashboard to include celery and kafka consumer related operations.
  • Take the part of DeploymentMonitoringMiddleware that actually sets the custom attributes, and make it into a utility method that could be used from outside the middleware as well
  • In event-bus-kafka, we could add a call to this new method here. Reminder: add an edx-django-utils minimum constraint in base.in to ensure it gets published as part of the package.
  • The Celery change is a little trickier, only because we don't have a mechanism set up to plug in to all services yet (although this is very close).
    • It would probably need to be implemented in a plugin. It would either use a celery signal or DD hook as mentioned in Automatically set code owner for celery tasks #729.
    • If the plugin were defined in edx-django-utils, it would get added to all services (once the new plugin endpoint were defined and added to each service), because this library is already installed in each service.
      • The trouble with doing this in edx-django-utils is that it probably won't work for New Relic. That said, the feature benefits the entire community for upgrades, so hopefully this would be acceptable.
      • The alternative would be to create a 2u-django-utils repo that privately gets deployed to all our services. This is a nice-to-have capability in the long run, but would take additional work, so we'd need to consider if it is worth it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants