Skip to content

Metrics

Gateway and node expose Prometheus text exposition at GET /metrics.

Listener Default Env
Gateway /metrics same as HTTP bind (127.0.0.1:8080) MOMO_GATEWAY_BIND
Node /metrics 127.0.0.1:9101 MOMO_NODE_METRICS_BIND
Store watch lag recorded by store adapters momo_store_watch_lag_seconds

Public binds require MOMO_ALLOW_PUBLIC_BIND=1.

Metric Type Labels Meaning
momo_gateway_route_hits_total counter Host matched a RouteSpec
momo_gateway_route_misses_total counter Unknown Host (404 path)
momo_gateway_node_connected gauge node 1 when gRPC connected + heartbeat fresh
momo_gateway_acquire_duration_seconds histogram node, app Acquire RPC latency
momo_gateway_cold_starts_total counter Acquire reported cold start
momo_gateway_responses_total counter status Proxied HTTP status (includes 101)
momo_gateway_inflight_requests gauge Requests currently in flight
momo_gateway_websocket_active gauge Active upgraded WebSocket bridges
momo_gateway_route_watch_healthy gauge 1 when store route watch is healthy
Metric Type Labels Meaning
momo_node_acquire_total counter result (ok/error) Acquire outcomes
momo_node_release_total counter result (ok/error) Release outcomes
Metric Type Meaning
momo_store_watch_lag_seconds gauge Seconds since last successfully applied watch event

Set MOMO_LOG_FORMAT=json for one JSON object per line (required in production). Default text is for local development. Honor RUST_LOG for filter levels.

Terminal window
curl -s http://127.0.0.1:8080/metrics # gateway
curl -s http://127.0.0.1:9101/metrics # node

Prometheus scrape config sketch:

scrape_configs:
- job_name: momo-gateway
static_configs:
- targets: ["127.0.0.1:8080"]
- job_name: momo-node
static_configs:
- targets: ["127.0.0.1:9101"]