Metrics
Sablier can expose a Prometheus-compatible /metrics endpoint. Enable it on the server:
# compose.yml
services:
sablier:
image: sablierapp/sablier:1.15.0
command:
- start
- --provider.name=docker
- --server.metrics.enabled=true
ports:
- "10000:10000"
volumes:
- /var/run/docker.sock:/var/run/docker.sockWhen server.metrics.enabled is true, Sablier registers a GET <base-path>/metrics route on the same HTTP server that handles /health and /api/... (see the CLI reference). The route returns the Prometheus text exposition format and is served by promhttp. When set to false (the default), the route is not registered and any request to that path returns 404.
Exposed metrics
| Name | Type | Labels | Description |
|---|---|---|---|
sablier_group_active_instances | gauge | group | Number of instances in the group with an active session. |
sablier_group_locked | gauge | group | Whether the group has at least one instance with an active session (1) or not (0). |
sablier_instance_active_seconds_total | counter | instance | Cumulative seconds each instance has spent in the Ready state. Incremented each time an instance’s session expires. Use increase() or rate() over a time window to compute the active fraction. |
sablier_instance_ready_duration_seconds | histogram | instance | End-to-end wall time from first not-ready observation to ready (seconds). |
sablier_instance_start_duration_seconds | histogram | instance | Duration of provider.InstanceStart calls (seconds), only successful starts. |
sablier_instance_start_failures_total | counter | instance | Total number of provider InstanceStart failures, by instance. |
sablier_instance_stops_total | counter | instance, reason | Total number of instance stops, by instance and reason. |
sablier_session_expires_at_timestamp_seconds | gauge | group, instance | Unix timestamp (seconds) at which the instance’s session expires and the instance is stopped. One series per active session. The value tracks the latest access and is pushed back on every session renewal. Derive the remaining time in Grafana with the expression: value - time(). |
sablier_session_requests_total | counter | strategy, target | Total number of session requests received, by strategy and target. |
| Go runtime + process collectors | (default) | (default) | Standard go_* and process_* metrics from the Prometheus Go client. |
Security note
The endpoint exposes process internals, group and instance names, and counters. It is intended for trusted observability stacks. Restrict at the reverse proxy when Sablier is fronted on an untrusted network.