Skip to main content

Module metrics

Module metrics 

Source
Expand description

Prometheus metrics for the REST API.

Exposes GET /metrics in the Prometheus text exposition format with strictly bounded cardinality: labels are drawn only from the fixed set of endpoints and engine names — never from search queries or target URLs.

Metric families:

  • phrona_http_requests_total{endpoint,status} (counter)
  • phrona_http_request_duration_seconds{endpoint} (histogram)
  • phrona_engine_requests_total{engine,status} (counter)
  • phrona_engine_errors_total{engine,scope,kind} (counter)
  • phrona_engine_duration_seconds{engine} (histogram)

Structs§

EngineMetricsObserver
Core-crate observer forwarding engine outcomes into Prometheus.
Metrics
Registered metric families and the registry they are gathered from.

Functions§

http_layer
Counts every HTTP request after the inner service responded: endpoint (request path) and status code are the only labels.
metrics_route
GET /metrics — Prometheus text exposition of every registered family. Deliberately unauthenticated so scrapers do not need to carry API keys.