Skip to content

Metrics

Send custom metrics or OpenTelemetry metrics and chart them with percentiles.

Send metrics

A metric point is a name, a number, optional labels and a time. Use a key with only write metrics (preset Metrics ingestion).

Over HTTP

Send a metric
curl -X POST https://api.vitalrix.com/api/v1/metrics \
  -H "x-api-key: $VITALRIX_API_KEY" \
  -H "content-type: application/json" \
  -d '{"metrics":[{"name":"checkout.duration_ms","value":182,"labels":{"service":"my-shop","route":"/checkout"}}]}'
# {"success":true,"data":{"accepted":1}}
  • Up to 1,000 points per request.
  • Names: letters, digits and _ . : / -, starting with a letter or underscore, up to 200 characters.
  • Up to 20 labels per point. Values may be text, numbers or true/false.
  • Timestamp optional: up to 366 days old, at most 5 minutes ahead.

With OpenTelemetry

OpenTelemetry metric exporter settings
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=https://api.vitalrix.com/api/v1/metrics/otlp/v1/metrics
OTEL_EXPORTER_OTLP_METRICS_HEADERS=x-api-key=pk_your_key
OTEL_EXPORTER_OTLP_METRICS_PROTOCOL=http/protobuf   # or http/json

Gauges and sums become one point each. Histograms become .count, .sum, .avg and .max; summaries also get .p50 to .p99. service.name becomes the service label and the environment the environment label.

Explore metrics

On the Metrics page, pick a metric and choose:

Metric explorer options
OptionChoices
Aggregationavg, sum, min, max, count, p50, p75, p90, p95, p99
Bucket1 minute, 5 minutes, 15 minutes, 1 hour, 1 day (picked for you from the range)
Group byOne label, for one line per value (for example per route)
FilterLabel values such as env=prod
RangePresets or a custom range

A distribution panel shows P50 to P99, average, minimum, maximum and the number of samples. Gaps with no data stay empty instead of showing zero. The chart's settings are part of the address, so you can share it.

Built-in metrics

Every uptime check records monitor.up (1 or 0) and monitor.response_time_ms, labelled with the monitor. The infrastructure agent sends infra.cpu_percent, infra.cpu_cores, infra.cpu_utilization_percent and infra.memory_mb.

Alert on a metric

Create a Metric threshold rule under Alerts › New rule. Limit it with labels to watch one service or route. See Alert conditions.

Something unclear or missing? Open VitalRix and use the in-app setup guides, or read Troubleshooting.