Add Queue Time Metrics for All Detected Queues #371
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @danihodovic and contributors,
This is my first-ever pull request, so please bear with me if I miss anything—I'm open to feedback! I aimed to address the issue where celery-exporter doesn't expose queue time metrics. I implemented queue time metrics for celery-exporter to track the latency between task receipt and task start for all detected queues, inspired by Grafana's celery-exporter. To achieve this, I used Claude, to help replicate the metric logic (just want to be clear i vibe code it), which I carefully reviewed to ensure compatibility with the project. The implementation uses cachetools.LRUCache to store task receive timestamps, calculates latency on the task-started event, and removes the task ID from the cache to manage memory.