#15058·dynamo

DEP: Standalone EPP observability

Author: flpanbinCreated Sep 18, 2026Updated Oct 1, 2026
Labelsenhancementlanguage::rustbackend::vllmdeployment::k8smetricsobservabilitybackend::sglangbackend::trtllm

Summary

Propose the metrics and structured-log observability design for the standalone EPP, covering DEP #11661 Milestone 9: Embedded EPP Observability. This issue is the design artifact before implementation: it draws from the existing Dynamo Frontend/router telemetry and from the llm-d EPP, and defines exactly which series are added, where they are emitted, and how they behave across EPP deployment modes.

Motivation

Today the standalone EPP is nearly unobservable. It exposes exactly one metric — dynamo_epp_cached_tokens{model} — on a private prometheus::Registry served at DYN_EPP_METRICS_PORT (default 9090), and its logging is tracing_subscriber::fmt() with RUST_LOG, text-only (no JSONL), unlike the Dynamo runtime (DYN_LOGGING_JSONL / DYN_LOGGING_CONSOLE_FORMAT). The decode sidecar (deploy/inference-gateway/sidecar/) has zero metrics, no metrics port, and only a littletracing calls.

Scope (from #11661 M9): "The standalone EPP provides metrics and structured-log observability at parity with the relevant Dynamo Frontend/router behavior for equivalent request paths. Operators can diagnose EPP-owned request processing, routing, selection, reservation lifecycle, replica behavior, and disaggregated handoff without requiring the Dynamo runtime."

Target configuration. DYN_EPP_MODE=standalone with vanilla (non-Dynamo) engines — the on-ramp example's backend is "Raw vLLM aggregated worker pool. Vanilla image" (examples/onramp/agg.yaml:57-58).

Goals. Cover the M9 diagnostic domains with Prometheus metrics; structured logs at parity with the runtime (JSONL, consistent fields, span-carried identity); every metric documented in metrics-catalog.mdx with an availability-by-configuration matrix.

Proposal

Design inputs

  • Dynamo Frontend/router telemetry:

    • lib/llm/src/kv_router/metrics.rs — router metric families.
    • lib/llm/src/http/service/metrics.rs — frontend request metrics, InflightGuard.
    • docs/fern/pages/reference/observability/metrics-catalog.mdx and metric-labels.mdx.
  • llm-d EPP metrics: the reference implementation we compare against. llm-d is mid-migration from inference_* to llm_d_epp_* with both names registered — a useful precedent if Dynamo ever renames an EPP series.

  • PR #13143 (open, not yet merged): frontend metrics namespace attribution. This design adopts its post-merge shape as the parity baseline and follows its compatibility discipline.

  • DEP #11661 component boundary: EPP owns the Envoy ext_proc/GAIE protocol, tokenization, Kubernetes worker discovery, and selection-lifecycle reporting; embedded SelectionService owns the catalog, KV index, scoring, queue, and reservation state.

Design principles

  1. Parity, not duplication. The EPP exposes the service-level view of the same quantities the frontend/router expose — parity of diagnosability, not name-for-name parity.
  2. No DRT dependency. The standalone EPP holds no DistributedRuntime past startup; all new series go on the existing private registry — same rationale as dynamo_epp_cached_tokens.
  3. Cardinality safety. All identity labels are bound at startup or drawn from closed enums:
    • model — bound once via set_served_model() (existing mechanism; never from the request body).
    • inference_pool — const label bound once at startup from DYN_EPP_INFERENCE_POOL_NAME. This is EPP-owned deployment identity: it separates several pools in one cluster.
    • worker_type — closed enum, values taken from WorkerType (aggregated / prefill / decode / encode. But the standalone EPP builds exactly one Aggregated SelectionService today, so this label is currently constant.
    • reason / error_type / status / action / event_type — closed enums only.
    • dynamo_namespace — not carried: because standalone holds no DistributedRuntime.
    • No worker_id, pod name, or endpoint labels on hot-path metrics. Per-worker debugging is served by logs and by the worker-side.
  4. Labels are added, never renamed or removed (PR #13143 discipline)
  5. Availability is documented per configuration. Metric groups register/populate differently across aggregated vs disaggregated, KV events on/off, single vs multi replica — following the existing "Availability by configuration" matrix format in metrics-catalog.mdx.

Proposed metrics

⚠️ Prefix pending. Some Series are listed without their prefix. New series use dynamo_epp_, The prefix for the (inherited) rows is still open: dynamo_epp_ (this DEP's proposal) or dynamo_component_router_ (inherit the router's namespace). Every other decision here is independent of that choice.

All new series take the dynamo_epp_ prefix and the startup-bound const label set model + inference_pool (only variable labels shown in tables for brevity).

Histogram buckets are frozen at design time and aligned to the existing Frontend/Router series. All reason / phase label values in this doc are proposed naming introduced by this issue, not existing code identifiers.

Priority: P0 = required in M9a; P1 = M9b; P2 = M9c or undecided.

Domain 1 — Request processing

Metric Type Labels Priority Where (file::fn) Notes
requests_total (inherited) counter error_type, status P0 server.rs ext_proc stream handlers, via request-scope RAII guard status is success/error, matching dynamo_frontend_requests_total. error_type mirrors PickError, set only when status="error"
dynamo_epp_request_duration_seconds histogram — P0 server.rs RAII guard Buckets: same as dynamo_frontend_request_duration_seconds (defaults). Full request, received → response complete/cancel/error.
time_to_first_token_seconds (inherited) histogram — P0 server.rs first non-empty response body (the event that drives prefill_complete) Buckets: same as dynamo_frontend_time_to_first_token_seconds. Under non-streaming the sample degenerates to the full duration.
dynamo_epp_picks_inflight gauge — P0 epp_router.rs::pick (permit acquire/release) Requests currently inside pick().
dynamo_epp_requests_inflight gauge — P1 server.rs request loop (stream open / teardown) Modelled on llm-d llm_d_epp_extproc_streams_inflight and Frontend dynamo_frontend_inflight_requests. Not redundant with picks_inflight, which only covers the pick window.
input_sequence_tokens (inherited) histogram — P1 epp_router.rs::tokenize response Buckets: same as dynamo_frontend_input_sequence_tokens (defaults).
output_sequence_tokens (inherited) histogram — P1 server.rs response usage parse Buckets: same as dynamo_frontend_output_sequence_tokens. From the backend-reported completion_tokens.
dynamo_epp_streams_total counter code P1 server.rs::process stream exit Modelled on llm-d llm_d_epp_extproc_streams_total{code}. code = gRPC status (OK/Canceled/DeadlineExceeded/Unknown…). Requires a source change: server.rs currently downgrades the stream status to Status::unknown.
dynamo_epp_cached_tokens (existing) histogram — — already emitted Align with current design - same model + inference_pool const labels. Buckets: same as dynamo_frontend_cached_tokens.

Domain 2 — Routing: tokenization and selection overhead

Metric Type Labels Priority Where (file::fn) Notes
dynamo_epp_tokenizer_duration_seconds histogram protocol (vllm-render/sglang-renderer) P0 epp_router.rs::tokenize; vllm_render_client.rs / sglang_renderer_client.rs Buckets: same as dynamo_frontend_tokenize_seconds , EPP owned tokenization step; distinguishes slow tokenization from slow selection.
dynamo_epp_tokenize_errors_total counter protocol, reason P0 same as tokenize_duration_seconds reason = the four PickError tokenizer variants (unavailable/timeout/upstream_error/invalid_request).
dynamo_epp_selection_duration_seconds histogram worker_type P0 selector.rs::select_and_reserve wrapper Time inside SelectionService.pick(). Equivalent of dynamo_routing_overhead_total which is frontend only today. Buckets: same as dynamo_frontend_stage_duration_seconds.
dynamo_epp_selection_overlap_blocks histogram worker_type P0 same as selection_duration_seconds, from SelectResponse.overlap.longest_matched Buckets: same as dynamo_frontend_router_overlap_blocks_lost. Predicted overlap in blocks.
dynamo_epp_selection_errors_total counter worker_type, reason P0 same as selection_duration_seconds reason = no_workers / queue_full / timeout / capacity_exceeded / internal, Needed to diagnose 503s without log parsing.
non_max_overlap_selections_total (inherited) counter worker_type P2 requires a crate change How often the scheduler picks a worker with less KV overlap than the best candidate — what load balancing costs in cache hits
overlap_blocks_lost (inherited) histogram worker_type P2 requires a crate change Blocks given up by the row above. Both are MetricVecs, so they emit nothing until a label combination is touched
dynamo_epp_approximate_* (name TBD) — — P2 dynamo-kv-router Placeholder, not a defined series. The EPP runs an approximate-LRU index in-process, but the crate registers no Prometheus metrics — needs an observability hook

Domain 3 — Reservation lifecycle

Metric Type Labels Priority Where (file::fn) Notes
dynamo_epp_active_reservations gauge worker_type P0 inc at selector.rs::select_and_reserve success; dec Selector::free_reservation How many requests currently hold worker capacity.
dynamo_epp_reservation_duration_seconds histogram worker_type P1 selector.rs::free_reservation How long a request holds worker capacity. Buckets: same as request_duration_seconds.

Domain 4 — Worker discovery and catalog

Metric Type Labels Priority Where (file::fn) Notes
dynamo_epp_workers_registered gauge worker_type P0 new call site Selector.service. ready() Live worker count in the SelectionService. No analog on EPP port today.
dynamo_epp_workers_ready gauge worker_type P0 same snapshot ReadyResponse. schedulable_workers Ready subset of registered workers. Gap between this and workers_registered surfaces stale discovery or failed health checks.
dynamo_epp_discovery_errors_total counter source (pod_watch / inference_pool / peer_watch) P1 pod_discovery.rs, inference_pool.rs, peer_discovery.rs Counts failures of the watches that feed the EPP's worker view — some tracing::warn! sites today, so a failing watch is invisible unless someone reads logs.

Domain 5 — Replica behavior

Metric Type Labels Priority Where (file::fn) Notes
dynamo_epp_peers gauge — P0 peer_discovery.rs ::reconcile_once How many sibling EPP replicas this one syncs load with — self excluded.
dynamo_epp_peer_errors_total counter operation (register / deregister), reason P1 peer_discovery.rs Failed attempts to add or remove a peer. reason is mirror the ReplicaPeerError: invalid_endpoint / disabled / unavailable.

Domain 6 — Disaggregated handoff (decode sidecar)

The sidecar is a separate binary, an HTTP proxy inside the decode pod. It exposes no metrics endpoint today, hence the new env DYN_SIDECAR_METRICS_PORT (default 9091, 0 disables — same semantics as DYN_EPP_METRICS_PORT=0), same private-registry pattern. Its series take the prefix dynamo_sidecar_.

P/D handoff is not implemented yet: the sidecar binary ships with UnavailablePdAdapter.

Metric Type Labels Priority Where (file::fn) Notes
dynamo_sidecar_requests_total counter error_type P2 server.rs::handle How many requests the sidecar handled, split by failure reason.
dynamo_sidecar_request_duration_seconds histogram — P2 same as requests_total How long the sidecar waits for the upstream to start responding — from entering the handler to the upstream response headers arriving. Buckets: same as EPP's request_duration_seconds

Structured logging

Logs should reach parity with the Dynamo runtime on three axes: format (same JSONL init and field style), fields (request identity), and behavior (the same events at the same lifecycle moments, at the same levels).

Design decisions

  1. Use the runtime logging init for EPP and sidecar: replace the local tracing_subscriber::fmt() + EnvFilter with call logging::init() (lib/runtime/src/logging.rs).
  2. One span per ext_proc request, following the frontend InflightGuard.span convention.
  3. Level discipline. Request path: trace/debug only. Lifecycle: info. Recoverable anomalies (such as watch reconnect): warn. Operator action required (server exit, init failure): error.
  4. Rate-limited warnings for per-event faults that can fire indefinitely, following the record_unsupported_residency_event pattern.
  5. Payload hygiene Logs and metrics carry identifiers only, like request_id, reservation_id, worker_id, model — never request bodies, prompts, token IDs, or response content.

Log events are co-located with the metric instrumentation sites defined above — logs and metrics are emitted together, not designed separately.