Back to Activepieces

Observability

docs/install/configure-operate/setup-opentelemetry.mdx

0.87.02.3 KB
Original Source

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.

Log Export Variables

VariableDescriptionDefault ValueExample
AP_OTEL_ENABLEDExport logs via the OTLP log drainfalsetrue
AP_OTEL_QUEUE_METRICS_ENABLEDExport BullMQ queue metrics via OTLPfalsetrue
OTEL_EXPORTER_OTLP_ENDPOINTOTLP endpoint for log and metric exportNonehttps://your-collector:4318
OTEL_EXPORTER_OTLP_HEADERSHeaders for OTLP exporter (comma-separated key=value pairs)NoneAuthorization=Bearer token

Queue Metrics

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.

MetricTypeAttributesDescription
bullmq.job.countGaugequeue, stateNumber 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.

<Warning> Outbound requests from the app go through an SSRF filter that blocks private, loopback, and link-local IPs. If your OTLP collector resolves to a private IP (for example an in-cluster collector), add its IP or CIDR to the `AP_SSRF_ALLOW_LIST` environment variable. </Warning>

Sampling Variables

VariableDescriptionDefault Value
AP_LOG_SAMPLE_RATE_INFOPercentage of info-level events to keep (0–100)100
AP_LOG_KEEP_SLOW_MSAlways keep requests slower than this threshold (ms)2000
<Note> Events with level `warn` or `error` are always kept regardless of sampling configuration. `AP_OTEL_ENABLED=true` enables the OTLP log drain; `AP_OTEL_QUEUE_METRICS_ENABLED=true` enables queue metrics export. OpenTelemetry tracing is not emitted. </Note>