Skip to content

Improve metrics in Celery instrumentation #3458

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

Open
3 tasks done
rbagd opened this issue May 2, 2025 · 0 comments · May be fixed by #3463
Open
3 tasks done

Improve metrics in Celery instrumentation #3458

rbagd opened this issue May 2, 2025 · 0 comments · May be fixed by #3463

Comments

@rbagd
Copy link
Contributor

rbagd commented May 2, 2025

What problem do you want to solve?

Our instrumented Celery applications often are deployed along with Celery Flower to monitor a few metrics on tasks and workers. But those metrics can also be made available through auto-instrumentation. I am sure for those whose usage of Flower is limited having it all in a single instrumentation would be beneficial.

Describe the solution you'd like

  • Add metrics from Celery Flower, i.e. counts for executing and prefetched tasks as well as prefetch and execution duration of a task.
  • Rename those metrics according to OTel semantic conventions
  • Fix a memory leak in current metrics generation (this entry never gets removed)

Describe alternatives you've considered

No response

Additional Context

I got some parts working in my local environment but testing has been a challenge. I don't think I ever had all unit tests passing even in clean setup. I have no idea if it's something in my own environment as Celery tests appear to be generally green in PRs.

Would you like to implement a fix?

Yes

@rbagd rbagd linked a pull request May 5, 2025 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant