Skip to main content
LangWatch exposes Prometheus metrics and health check endpoints for monitoring your self-hosted deployment.

Prometheus

The Helm chart includes an optional Prometheus instance that scrapes metrics from LangWatch components.

Enable Prometheus

What Gets Scraped

Each component has its own scrape job. A job keeps only pods annotated prometheus.io/scrape: "true" whose app.kubernetes.io/name label is that component’s (<release>-app or <release>-workers). The chart adds the annotation to the app and workers pods when app.telemetry.metrics.enabled is true. Neither component serves /metrics until app.telemetry.metrics.enabled is on with an API key, and then both require that key as a bearer token. The chart-managed Prometheus sends the key only when it is set through app.telemetry.metrics.apiKey.value. With apiKey.secretKeyRef, the pods get the key but the scrape config does not, and both jobs are answered with 401.

Access Prometheus

Port-forward to the Prometheus UI:

External Prometheus

To use an existing Prometheus instance instead of the chart-managed one:
You’ll need to configure your external Prometheus to scrape the LangWatch pods, sending the metrics API key as a bearer token. With app.telemetry.metrics.enabled: true, the app pods are annotated with:
The workers pods are annotated with:
Both serve the metrics on the path /metrics.

Grafana

Connect Grafana to your Prometheus instance to visualize LangWatch metrics.

Key Dashboards

Set up dashboards for:
  • Span throughput: spans ingested per minute
  • Worker queue backlog: groups waiting to be processed and the age of the oldest pending job (indicates processing bottleneck)
  • ClickHouse query latency: p50/p95/p99 query times
  • Resource utilization: CPU and memory per component

Example Queries

Health & Readiness Checks

Endpoints

Kubernetes Probes

The Helm chart configures probes automatically. The app probes /api/health on port 5560:
The workers use the same startup budget and a liveness probe every 30 seconds, both on /healthz at port 2999. They have no readiness probe.

Manual Health Check

Alerting Recommendations

Set up alerts for these critical conditions:

Example Alertmanager Rule

Prometheus Configuration Reference

Full Prometheus configuration in the Helm chart:
Last modified on October 12, 2026