Skip to content

Additional metrics exported from Celery workers #3463

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rbagd
Copy link
Contributor

@rbagd rbagd commented May 5, 2025

Description

This PR includes an enhancement regarding metrics exported from Celery workers and implements these measurements

  • Prefetched task up-down counter (number of tasks queued locally in the worker) and time spent in prefetch mode
  • Active task up-down counter and task processing duration

Currently, there's only one metric being exported - flower.task.runtime.seconds, and it was renamed to follow semantic conventions (reported in the changelog).

Changes in this PR also fix a memory leak present in current instrumentation.

Fixes #3458

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • Unit tests added for all newly included and updated metrics

Does This PR Require a Core Repo Change?

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added

@rbagd rbagd requested a review from a team as a code owner May 5, 2025 10:31
@rbagd rbagd force-pushed the include_more_celery_metrics branch 4 times, most recently from 3755a64 to 8867346 Compare May 5, 2025 11:40
@rbagd rbagd force-pushed the include_more_celery_metrics branch from 8867346 to 09038ae Compare May 13, 2025 09:28
@rbagd rbagd force-pushed the include_more_celery_metrics branch from 09038ae to 2d192ca Compare May 13, 2025 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve metrics in Celery instrumentation
1 participant