Skip to content

For the complete documentation index, see llms.txt.

Observability

Observability spans the whole worker, not just analysis. Structured logging is always on; Datadog APM and Sentry are opt-in. You set these variables alongside the worker’s other configuration when you deploy the analyzer worker.

The worker emits structured JSON logs (one JSON object per line) from both the service process and the analysis child. Logging is always on and needs no configuration. Those logs reach Datadog on the container’s stdout, classified with the correct severity.

The analysis child runs as its own process. Its own stdout pipe stays reserved as the machine-readable result channel back to the parent service. Its structured logs still reach the container’s stdout alongside the service’s. Both processes are observable in one stream without disturbing that result channel.

The worker’s container entrypoint is ddtrace-run instruction-hub-worker, so the whole process starts under the Datadog tracer. APM tracing is off by default and opt-in: set DD_TRACE_ENABLED="true" to enable it. When tracing is on, the worker honors the standard Datadog environment variables you set, and analysis runs with LLM Observability enabled.

VariablePurpose
DD_TRACE_ENABLEDSet to "true" to enable Datadog APM. Off by default.
DD_ENVThe environment tag applied to worker spans.
DD_SITEThe Datadog site the agent reports to.
DD_AGENT_HOSTThe host of the Datadog agent that receives the spans.
DD_TRACE_*The standard Datadog tracer settings, passed through as set.

If you already run a Datadog agent, set these variables in your worker configuration so worker and analysis spans reach it.

The worker reports errors to Sentry when you set a DSN. Sentry is gated on the DSN being present, sends each ERROR-level event as a Sentry event, and does not enable performance tracing.

VariablePurpose
SENTRY_DSNThe Sentry DSN to report to. Setting it enables Sentry.
SENTRY_ENVIRONMENTThe environment tag applied to events.
SENTRY_RELEASEThe release identifier applied to events.