Monitoring & Metrics
DevGuard exposes health endpoints for Kubernetes probes and optionally integrates with Prometheus and Grafana via the Helm chart's built-in observability stack.
Health Endpoints
Both services expose health endpoints configured as Kubernetes liveness and readiness probes:
| Endpoint | Service | Port |
|---|---|---|
/api/v1/health | API | 8080 |
/api/health | Web frontend | 3000 |
Distributed Tracing & Span Metrics
When api.tracing.enabled: true is set, the Helm chart injects an OTel Collector sidecar into the API pod. The sidecar runs alongside the API container and handles three things:
- Receives traces from the API on
localhost:4317(gRPC) — the API is automatically configured to export traces to the sidecar - Generates span metrics — converts spans into Prometheus-format histogram metrics on port
8889 - Forwards traces to your backend (Jaeger, Grafana Tempo, or any OTLP-compatible collector)
API container → [localhost:4317] → OTel Collector sidecar → :8889 (Prometheus scrape)
→ otlpEndpoint (Jaeger / Tempo / ...)
Enable tracing
Add the following to your values.yaml:
For backends that require authentication, provide credentials via a secret:
Create the secret:
Sidecar image and resources
The sidecar uses otel/opentelemetry-collector-contrib. You can tune resource limits and the span metrics configuration:
Prometheus ServiceMonitor (optional)
When using the Prometheus Operator, enable ServiceMonitor resources for automatic scrape target discovery:
The PostgreSQL ServiceMonitor is created whenever observability.serviceMonitor.enabled: true, regardless of tracing. It deploys a postgres-exporter sidecar and scrapes it on port 9187.
Grafana Dashboard (optional)
A Grafana dashboard ConfigMap for the span metrics can be deployed automatically:
Checking logs
For operational visibility without a full observability stack, check the API logs directly: