Observability#
LMCache multiprocess mode provides three complementary observability modes: metrics (Prometheus counters via OTel), logging (Python logging with optional OTel log forwarding), and tracing (OTel spans for per-request latency).
All three modes are powered by an internal EventBus that decouples producers (L1Manager, StorageManager, MPCacheServer) from subscribers.
Quick Start#
By default, metrics and logging are enabled; tracing is disabled. No extra flags are needed:
lmcache server \
--l1-size-gb 100 --eviction-policy LRU
To enable tracing, supply an OTLP endpoint:
lmcache server \
--l1-size-gb 100 --eviction-policy LRU \
--enable-tracing --otlp-endpoint http://localhost:4317
Configuration#
Argument |
Default |
Description |
|---|---|---|
|
off |
Master switch: disable the EventBus entirely (no metrics, logging, or tracing subscribers are registered). |
|
off |
Skip metrics subscribers (Prometheus endpoint is not started). |
|
off |
Skip logging subscribers. |
|
off |
Register tracing subscribers. Requires |
|
|
Maximum events in the EventBus queue before tail-drop. |
|
(none) |
OTLP gRPC endpoint (e.g. |
|
|
Port for the Prometheus |
|
|
Fraction of chunks/blocks to track for lifecycle histograms (0, 1.0]. Counters always count all events. Default is 1%. |
|
(none) |
Enable trace recording at the given level. Currently only
|
|
(none) |
Path to write the trace file. If omitted while |
Environment variables:
Variable |
Default |
Description |
|---|---|---|
|
|
Controls the log level for all LMCache loggers. Valid values:
|