All documentation
Observability
Inspect logs, metrics, and traces in production.
Observability
Export OpenTelemetry traces, structured logs, dependency-aware health checks, and Prometheus metrics. Phoenix tracing is an optional integration.
Environment
# pip install "docpipe-sdk[server,observability]"
DOCPIPE_OTEL_ENABLED=true
DOCPIPE_OTEL_SERVICE_NAME=docpipe
DOCPIPE_OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318/v1/traces
DOCPIPE_OTEL_TRACES_SAMPLER_ARG=1.0
DOCPIPE_LOG_FORMAT=json
DOCPIPE_HEALTH_CHECK_DB=true
$ docpipe serve
# curl http://localhost:8000/health # plugins + dependency status
# curl http://localhost:8000/metrics # Prometheus (no auth on /metrics)| Variable | Default | Purpose |
|---|---|---|
| DOCPIPE_OTEL_ENABLED | false | Export traces via OTLP/HTTP |
| DOCPIPE_OTEL_SERVICE_NAME | docpipe | Set the service.name resource |
| DOCPIPE_OTEL_EXPORTER_OTLP_ENDPOINT | — | Collector URL, for example http://localhost:4318/v1/traces |
| DOCPIPE_LOG_FORMAT | text | Set to json for structured logs |
| DOCPIPE_HEALTH_CHECK_DB | true | Run a database probe when a DB URL is configured |
| DOCPIPE_PHOENIX_ENABLED | false | Enable optional Phoenix tracing |