Skip to main content
Reference

Shipping metrics

Send OpenTelemetry metrics from your BYOC cluster to Rivet.

Sharing metrics lets the Rivet team monitor your cluster’s health and support your deployment. Metrics are sent over OTLP/HTTP and authorized with a per-cluster token.

Requirements

  • A BYOC cluster. If you don’t have one yet, follow the Quickstart.

Steps

Create a token

On your cluster’s BYOC page in the Rivet dashboard, open Metrics ingest token and click Create token. Copy it now, it’s shown only once.

Add Rivet to your Collector

Store the token in a Kubernetes Secret in the Collector’s namespace, or sync it there from your secret store. Keep the token out of the Collector config and source control.

env:
  - name: RIVET_METRICS_TOKEN
    valueFrom:
      secretKeyRef:
        name: rivet-metrics-token
        key: token

Add Rivet as an otlphttp exporter in your OpenTelemetry Collector config and reference it from your metrics pipeline. The Collector reads the token from its environment:

exporters:
  otlphttp/rivet:
    metrics_endpoint: https://byoc-otel.rivet.dev/v1/metrics
    headers:
      Authorization: "Bearer ${env:RIVET_METRICS_TOKEN}"

service:
  pipelines:
    metrics:
      exporters: [otlphttp/rivet]