Rivergate

Observability

Thoth gives you live visibility into Rivergate itself. It works with the tools you already run, and none of them are required.

Signal paths

The API and the worker each provide three ways to observe them.

PathInterfaceNotes
Metrics scrapePrometheus-compatible /metricsPrivate listeners. Defaults: API 127.0.0.1:9464, worker 127.0.0.1:9465. Compose keeps both on the internal network and does not publish them.
OpenTelemetryOTLP/HTTP logs, metrics and tracesOptional. Standard OTEL_EXPORTER_OTLP_* variables.
LogsStructured JSON on stdoutCollected by your container log pipeline. Sampled request logs carry trace and span IDs.

Rivergate does not bundle Prometheus, Grafana, an OpenTelemetry Collector, alert notification, or metric history. It exposes standard interfaces, and you connect the backend you prefer.

What is measured

AreaMeasurements
HTTPRequest count, latency and active requests by method, route template and response class — for the API and the worker’s health endpoints.
PostgreSQLOperation counts and durations by SELECT, INSERT, UPDATE, DELETE or other; errors without SQL or arguments; live pool state and acquisition counters.
RedisCommand categories and durations, errors without keys or values, pipeline timing, pool state, waits and timeouts.
WorkerPer-batch runs, failures, worked batches and duration for audit checkpoints, key rotation, hierarchy rotation, lease expiry and revocation, and replacement-request scheduling.
Rotation stateAggregate counts: running key rotations, pending replacement requests, pending credential revocations, failed leases in the last 24 hours. No tenant or resource IDs.
ProcessGo runtime and process metrics, uptime, and API request totals since start.
HealthLiveness and readiness for the API and worker, and current PostgreSQL and Redis availability.

Some totals — API request totals, worker job outcomes, pool counters — are process-lifetime values and reset on restart.

Health endpoints

Scrape with Prometheus

scrape_configs:
  - job_name: rivergate-api
    metrics_path: /metrics
    static_configs:
      - targets: [api:9464]
  - job_name: rivergate-worker
    metrics_path: /metrics
    static_configs:
      - targets: [worker:9464]

The targets above match the Compose network. Outside Compose, set METRICS_ADDR and WORKER_METRICS_ADDR to private listener addresses and restrict who can reach them. The endpoints have no authentication.

Ready-made scrape and alert-rule examples are in rivergate-deployment/deployments/observability/ (prometheus.yml and rivergate-alerts.yml). They cover elevated API 5xx rates, PostgreSQL pool pressure, Redis pool timeouts, worker job failures and pending credential revocations. Prometheus evaluates the rules; configure Alertmanager separately for notifications.

To look at the raw metrics in a Compose run:

docker compose exec api    wget -qO- http://127.0.0.1:9464/metrics | grep -E 'rivergate_(http_|postgres_|redis_|pool_|rotation_)'
docker compose exec worker wget -qO- http://127.0.0.1:9464/metrics | grep -E 'rivergate_(worker_|pool_|rotation_)'

Export with OpenTelemetry

Point Rivergate at a collector reachable from both the API and the worker. A shared endpoint enables all three signals:

OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318 make -C rivergate-deployment up

Or configure signals individually:

VariablePurpose
OTEL_EXPORTER_OTLP_ENDPOINTShared OTLP/HTTP endpoint for all signals.
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT · _METRICS_ENDPOINT · _TRACES_ENDPOINTPer-signal endpoints.
OTEL_LOGS_EXPORTER · OTEL_METRICS_EXPORTER · OTEL_TRACES_EXPORTERSelect or disable an exporter per signal.
OTEL_EXPORTER_OTLP_HEADERSCollector headers, for authenticated endpoints.

Traces

The admin view

System administrators have a native Observability page in the dashboard (GET /api/v1/system/observability). It shows component health for the API, worker, PostgreSQL and Redis, pool snapshots, aggregate rotation state, a worker job table and whether each exporter is configured. It reports current and process-lifetime values, not history, and it shows exporter configuration, not collector reachability.

Alerts

The admin view raises cards from real current or process-lifetime state:

These are indicators, not durable incident records. Rivergate does not send notifications or keep alert history; use Alertmanager for delivery.

Telemetry privacy

Telemetry never contains secret values, credentials, private keys, SQL text or arguments, Redis keys or values, request bodies, or tenant and resource identifiers.

Metrics endpoints are unauthenticated

Bind them to private networks and allow only approved scrapers.

What Thoth does not include

Historical storage, notification delivery, a public metrics API, Operator reconciliation metrics, and secret-specific dimensions are not part of Thoth. Use Prometheus or your OpenTelemetry backend for retention and alerting delivery.