Setting up observability
dflux EdgeGuard emits Prometheus metrics, structured logs, OTLP traces, and a deep health endpoint. This guide covers how to scrape, dashboard, alert, and trace through a typical deployment.
Prometheus metrics
Metrics are exposed at /metrics on the SBI listener and, when set, on the dedicated observability listener (observability.metrics_listen). The admin gRPC port does not serve Prometheus. Common request:
Headline series to scrape and dashboard:
edge_requests_total(counter) — total requests, bymethod,target_nf_type,status_code.edge_request_duration_seconds(histogram) — end-to-end request latency, bymethodandtarget_nf_type.edge_active_requests(gauge) — in-flight requests.edge_errors_total(counter) — proxy-side errors bycategory.edge_filter_decisions_total(counter) — decisions byfilteranddecision.edge_rate_limit_exceeded_total(counter) — denials by rate-limitrule.edge_producer_requests_total(counter) — forwarded requests bynf_type,producer, andresult.edge_circuit_breaker_open(gauge) — per-producer breaker state (1=open, 0=closed), bynf_typeandproducer.edge_sync_lag_seconds(gauge) — seconds since the last successful policy sync from the control-plane store.edge_policy_reload_errors_total(counter) — failed policy reload attempts.edge_diameter_requests_total(counter) — Diameter requests byapplication,command, andresult_code.edge_diameter_forward_total(counter) — forwarded requests byresult.edge_diameter_forward_duration_seconds(histogram) — Diameter forward latency byresult.edge_diameter_active_peers(gauge) — peers currently up.
Full label list lives in Reference → Metrics.
Scrape config
Scrape every 15s. Most series are cheap; the three histograms — edge_request_duration_seconds, edge_filter_duration_seconds, and edge_diameter_forward_duration_seconds — carry the bulk of the cardinality.
Dashboards
A four-panel core dashboard covers most operational questions:
- Request rate by
target_nf_typeand decision (allowed / denied). - P50 / P95 / P99 latency from
edge_request_duration_seconds. - Filter decisions stacked by filter (auth / policy / rate-limit / transformation).
- Producer health from
edge_producer_requests_total+ circuit-breaker state.
For Diameter:
- Peer count from
edge_diameter_active_peers. - Per-command request rate from
edge_diameter_requests_total. - Forward latency P95 from
edge_diameter_forward_duration_seconds. - Loop detection counter
edge_diameter_loop_detected_total.
Alerts to set early
- Sync lag rising.
edge_sync_lag_secondsclimbing past your sync interval means the proxy can't reach the control-plane store; running policy is going stale. - Policy reload errors > 0.
edge_policy_reload_errors_totalincremented — a reload was rejected and the previous policy is still in force. - Producer error rate > 5% over 5m. Producer-side issue or routing misconfiguration.
- Circuit breaker open on any producer.
edge_circuit_breaker_openis 1 — that producer is out of rotation. Page if it persists. - Diameter active peers below expected count. A peer dropped and isn't reconnecting.
Deep health
Plain liveness (GET /health on the SBI or metrics listener) tells you "the process is up". d3x-edgectl health-deep tells you "the process can actually serve traffic" — it checks producer availability, control-plane store reachability, and Diameter status:
The response carries a checks map with one entry each for producers, store, and diameter. It returns 200 only when none of those checks is fail (a 503 otherwise). Use it as a Kubernetes readiness probe; never as a liveness probe — you don't want kube to restart the proxy because a producer is briefly down.
OTLP tracing
Configure under observability.tracing:
The proxy emits spans for: inbound request, each filter, routing decision, outbound forward, and response stage. Trace context (W3C traceparent) is propagated through to the producer so downstream traces stitch into a single timeline.
Logs
Decisions are emitted as structured zerolog records — the same JSON stream you ship to a log pipeline or SIEM for the request-level trail. Choose between human-readable console output and one JSON object per line.
level: trace includes request and response bodies. Useful for debugging,
unsafe in production where bodies may contain PII.Change the log level on a running daemon without a restart — useful when chasing an issue. The level accepts debug, info, warn, or error:
Profiling
Set observability.pprof.enabled: true to expose net/http/pprof on the SBI listener. Useful for CPU or memory profiles during load tests; never enable in production on a publicly-reachable listener.
Where to go next
- Reference → Metrics — full series + label list.
- Admin API → Observability — metrics summary and health endpoints.