How partnerstack/celery-prometheus-exporter works
celery-prometheus-exporter monitors Celery over Redis and exposes task, worker, runtime, and configured queue-length metrics for Prometheus. The main workflow configures the exporter, receives Celery events into task state, periodically samples workers and queue lengths, updates metric collectors, and serves them over HTTP. The repository also contains a configured Celery demo workload. Relationships below are based on the README and excerpted source; unsampled integrations are not inferred.
Main entry points: exporter/__init__.py Periodic collector · metrics.py Metric definitions · config.py Demo task config · app/__init__.py Demo Celery tasks
Components 13
Exporter Setup
- Exporter startup
exporter/__init__.py - Celery client
exporter/__init__.py - Demo task config
app/config.py - Demo Celery tasks
app/__init__.py
Metric Collection
- Event receiver
exporter/__init__.py - Task state
exporter/__init__.py - Periodic collector
exporter/__init__.py
Metrics Exposure
- Metric definitions
exporter/metrics.py - Prometheus registry
exporter/metrics.py - HTTP metrics endpoint
exporter/__init__.py
Other components
- Operator
- Redis broker
- Prometheus
Connections 17
- Operator → Exporter startup: configures
README.md - Exporter startup → Celery client: configures
exporter/__init__.py - Celery client → Redis broker: connects to
exporter/__init__.py - Celery client → Event receiver: starts
exporter/__init__.py - Event receiver → Task state: updates
exporter/__init__.py - Event receiver → Metric definitions: observes runtime
exporter/__init__.py - Exporter startup → Periodic collector: starts
exporter/__init__.py - Periodic collector → Celery client: pings workers
exporter/__init__.py - Periodic collector → Redis broker: reads queue lengths
exporter/__init__.py - Periodic collector → Task state: counts tasks
exporter/__init__.py - Periodic collector → Metric definitions: updates gauges
exporter/__init__.py - Metric definitions → Prometheus registry: registers metrics
exporter/metrics.py - Exporter startup → HTTP metrics endpoint: starts
exporter/__init__.py - HTTP metrics endpoint → Prometheus registry: serves
exporter/__init__.py - Prometheus → HTTP metrics endpoint: scrapes
README.md - Demo task config → Redis broker: configures broker
app/config.py - Demo Celery tasks → Demo task config: uses settings
app/__init__.py