Prometheus metrics
Air Pipe exposes a Prometheus /metrics endpoint and lets actions emit custom
metrics. For distributed tracing see OpenTelemetry tracing.
Enable it
Set expose_metrics: true at the config root. The /metrics route is served in
self-hosted modes and is unauthenticated — scrape it from inside your network.
name: my-api
expose_metrics: true
interfaces:
# ...
Scrape config:
scrape_configs:
- job_name: airpipe
static_configs:
- targets: ["your-airpipe-host:PORT"]
Built-in metrics
| Metric | Type | Labels |
|---|---|---|
airpipe_interface_requests_total | counter | config, interface |
airpipe_interface_duration_ms | histogram | config, interface |
airpipe_http_action_duration_ms | histogram | config, interface, action |
axum_http_requests_total | counter | route/method/status |
axum_http_requests_duration_seconds | histogram | route/method/status |
axum_http_requests_pending | gauge | — |
Custom metrics
Emit your own metrics from an action with emit_metric. Full fields:
EmitMetric reference.
actions:
- name: RecordSignup
emit_metric:
name: signups_total # must be a valid Prometheus metric name
type: counter # counter (default) | gauge | histogram
value: 1
labels:
plan: a|body::plan|
- counter — increments by
1whenvalueis omitted. - gauge / histogram — require a
value. - Air Pipe auto-attaches
config,interfaceandactionlabels to every custom metric, in addition to anylabelsyou set.