Skip to content
ricochet

Metrics

Ricochet captures metrics that are exposed via a Prometheus server. The metrics are served at /metrics on port 6189 by default.

For example, to access the metrics from localhost:

Terminal window
curl http://localhost:6189/metrics

These metrics are on a separate port than ricochet so that they can be kept on an internal network.

Set the metrics address with metrics in the [network] section of ricochet-config.toml. Set it to 0.0.0.0:6189 when Prometheus scrapes from another host.

Add ricochet as a target in prometheus.yml:

scrape_configs:
- job_name: ricochet
static_configs:
- targets: ["localhost:6189"]
Metric Type Labels Description
ricochet_requests_total Counter type, content_id, status, method Requests served.
ricochet_connections_total Counter type, content_id Connections opened.
ricochet_invocations_started_total Counter content_id Invocations started.
ricochet_invocations_completed_total Counter content_id, status Invocations completed.
ricochet_invocation_duration_seconds Histogram content_id Time an invocation took to complete.
ricochet_app_instances_started_total Counter content_id App instances started.
ricochet_app_instances_stopped_total Counter content_id App instances stopped.
ricochet_request_duration_seconds Histogram type, content_id Time to serve a request. WebSocket connections are not included.
Metric Labels Description
ricochet_active_processes type, content_id Processes currently running.
ricochet_connections type, content_id Connections currently open.
ricochet_memory_bytes type, content_id Memory currently in use.
ricochet_peak_memory_bytes type, content_id Highest memory use observed.
ricochet_cpu_cores type, content_id CPU currently in use, in cores.
ricochet_longest_active_seconds type, content_id Age of the longest running process.
ricochet_last_invocation_timestamp_seconds content_id Unix time of the most recent invocation.
ricochet_build_info version, commit Always 1. The labels show which ricochet build is running.