docs/install/configure-operate/setup-opentelemetry.mdx
Activepieces exports structured logs via evlog. Each API request and worker job execution emits a single wide-event JSON object including duration, status, and sampling context.
| Variable | Description | Default Value | Example |
|---|---|---|---|
AP_OTEL_ENABLED | Export logs via the OTLP log drain | false | true |
AP_OTEL_QUEUE_METRICS_ENABLED | Export BullMQ queue metrics via OTLP | false | true |
OTEL_EXPORTER_OTLP_ENDPOINT | OTLP endpoint for log and metric export | None | https://your-collector:4318 |
OTEL_EXPORTER_OTLP_HEADERS | Headers for OTLP exporter (comma-separated key=value pairs) | None | Authorization=Bearer token |
When AP_OTEL_QUEUE_METRICS_ENABLED=true and OTEL_EXPORTER_OTLP_ENDPOINT is set, the app container also exports BullMQ queue metrics to <endpoint>/v1/metrics every 60 seconds, so your monitoring stack receives queue depth without exposing any HTTP admin surface.
| Metric | Type | Attributes | Description |
|---|---|---|---|
bullmq.job.count | Gauge | queue, state | Number of jobs per queue and state (waiting, active, failed, delayed, paused, and other BullMQ states) |
The gauge covers all queues, including dedicated worker-group queues. Each data point carries service.name=activepieces-api and host.name resource attributes, so replicas of the app container produce distinguishable series.
| Variable | Description | Default Value |
|---|---|---|
AP_LOG_SAMPLE_RATE_INFO | Percentage of info-level events to keep (0–100) | 100 |
AP_LOG_KEEP_SLOW_MS | Always keep requests slower than this threshold (ms) | 2000 |