OpenTelemetry instrumentation for the Absurd durable-task SDK
Low maintenance activity. Last release 4 months ago, commits in 1 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install opentelemetry-instrumentation-absurdopentelemetry-instrumentation-absurd
OpenTelemetry instrumentation for the Absurd
durable-task SDK (absurd-sdk).
Absurd (absurd_sdk.AsyncAbsurd) is a Postgres-backed durable task queue: a producer
spawn()s a task and a worker work_batch() claims and runs the registered handler, possibly
in a different process. Without instrumentation the two halves live in separate traces, so a
task's execution cannot be linked back to whatever spawned it.
This instrumentor follows the standard producer/consumer span shape for a task queue:
AsyncAbsurd.spawn()is wrapped to open aCLIENTspan named after the task and inject the current trace context into the task'sheaders. Absurd persists headers on the task row and hands them back to the handler viactx.headers.AsyncAbsurd.register_task()is wrapped so every registered handler runs inside arunning:<task>SERVERspan whose parent is extracted from those headers.
The two spans share one trace, so a task's execution is linked back to whatever spawned it — even when the spawner and the worker run in different processes.
trigger (your span)
└── report CLIENT ← spawn() (process A)
└── running:report SERVER ← handler (process B)
Installation
pip install opentelemetry-instrumentation-absurd
# or
uv add opentelemetry-instrumentation-absurd