Celery monitoring

Celery task monitoring that connects jobs to the request that queued them

A failed Celery task is usually discovered hours later. ErrorLens reports task failures the moment they happen, times every task, and links each one to the web request that enqueued it.

Set up in your Celery app

Initialize ErrorLens wherever your Celery app is created, so it runs in every worker:

pip install errorlens
celery_app.py
import errorlens
from celery import Celery

errorlens.init(dsn="https://<key>@errorlens.io/<project-id>", traces_sample_rate=0.2)

app = Celery("shop", broker="redis://localhost:6379/0")

What you get

  • Task exceptions with traceback, task name and task ID
  • A transaction per task run with its duration and the queries and HTTP calls inside it
  • Distributed traces: the trace continues from the web request that called .delay()
  • Failures and durations grouped per task name, so a flaky or slow task stands out

Catch beat jobs that never ran

A scheduled task that silently stops running raises no exception at all. Wrap it in a cron monitor and ErrorLens alerts you when a run is missed, fails or runs too long — see cron job monitoring.

@app.task
@errorlens.monitor("nightly-invoices", schedule="0 2 * * *", max_runtime=30)
def send_invoices():
    ...

Frequently asked questions

Is this a replacement for Flower?

They answer different questions. Flower shows live worker and queue state; ErrorLens records what failed and why, how long tasks take over time, and alerts you — with each task linked to the request that queued it.

Are task arguments sent?

No. Arguments often contain personal data, so only the task name and ID are attached to events.

Start tracking errors in minutes

Free hosted plan with 5,000 errors a month, or self-host with no limits. No credit card.