🔊(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:
committed by
aleb_the_flash
parent
912bac8756
commit
4eb7f29f8e
11
src/summary/summary/core/celery_config.py
Normal file
11
src/summary/summary/core/celery_config.py
Normal 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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user