Health endpoints
Voxray exposes two HTTP endpoints for health checking. They are unauthenticated and designed to be called directly by load balancers and orchestrators.
Use
/health as the liveness probe and /ready as the readiness probe. Do not swap them: a failing Redis should remove the pod from the load balancer’s rotation (/ready), but it should not cause Kubernetes to restart the pod (/health).
In single-instance mode with the default in-memory session store,
/ready always returns 200 OK as long as the process is up. The 503 behavior is only active when session_store=redis.Prometheus metrics
Voxray exposes metrics atGET /metrics in Prometheus text exposition format. Point a Prometheus scrape job at this endpoint.
Enabling and disabling
Metrics are enabled by default. To disable:/metrics endpoint returns 404. Re-enable by removing the key or setting it to true.
Prometheus scrape config
ServiceMonitor or annotate the pod with prometheus.io/scrape: "true" and prometheus.io/port: "8080".
Metric reference
HTTP metrics
These metrics cover all HTTP traffic into Voxray, including WebSocket upgrade requests and REST endpoints.AI pipeline metrics
Voxray instruments every stage of the STT → LLM → TTS pipeline with latency histograms and error counters. All pipeline metrics carry amodel label so you can compare provider performance without separate dashboards.
Speech-to-text (STT)
Large language model (LLM)
Text-to-speech (TTS)
WebRTC metrics
Recording metrics
Label cardinality
The
session_id label is passed through SampledSessionID() before being applied to any metric. This function either SHA-256 hashes the raw ID to a fixed-length hex string, or returns the constant "sampled_out" when the configured sample rate causes the session to be excluded. This prevents high-cardinality session IDs from creating unbounded time-series in Prometheus. You do not need to configure this separately — it is applied automatically inside the metrics package.session_id (hashed/sampled), stage, direction, status, model. For HTTP metrics, method, route, and status_code replace the pipeline-specific labels.
Alerting
The following alerts cover the most operationally significant failure modes. Add them to your Prometheus alerting rules or import them into Grafana.Structured logging
Log format
- Development (text)
- Production (JSON)
The default log format is human-readable text, suitable for local development and tailing with
docker logs or kubectl logs.Log levels
Override at runtime without redeploying by setting
VOXRAY_LOG_LEVEL in the environment. The environment variable takes precedence over the config file value.
Log shipping
Voxray writes logs to stdout. Ship them from stdout to your preferred backend using any standard log collector:- Grafana Loki
- Fluentd / Fluent Bit
- AWS CloudWatch
- Datadog
Use the Promtail agent or the Loki Docker driver to tail container stdout and push to Loki. With
json_logs: true, Promtail can parse fields automatically using json pipeline stages: