🔊(summary) add Celery exporter configuration for monitoring

Enable Celery task lifecycle events and broker dispatch events per
@rouja's exporter requirements. Basic configuration following
documentation without parameterization.
This commit is contained in:
lebaudantoine
2025-07-17 23:45:15 +02:00
committed by aleb_the_flash
parent 912bac8756
commit 4eb7f29f8e
2 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
# https://github.com/danihodovic/celery-exporter
# Enable task events for Prometheus monitoring via celery-exporter.
# worker_send_task_events: Sends task lifecycle events (e.g., started, succeeded, failed),
# allowing the exporter to track task execution metrics and durations.
worker_send_task_events = True
# task_send_sent_event: Sends an event when a task is dispatched to the broker,
# enabling full lifecycle tracking from submission to completion (including queue time).
task_send_sent_event = True

View File

@@ -37,6 +37,8 @@ celery = Celery(
broker_connection_retry_on_startup=True,
)
celery.config_from_object('summary.core.celery_config')
if settings.sentry_dsn and settings.sentry_is_enabled:
@signals.celeryd_init.connect