Module metrics

Source

Structs§

InflightGuard
RAII object for inflight gauge and request counters If this object is dropped without calling mark_ok, then the request will increment the request counter with the status label with REQUEST_STATUS_ERROR; otherwise, it will increment the counter with status label REQUEST_STATUS_SUCCESS
Metrics
Registry
A struct for registering Prometheus collectors, collecting their metrics, and gathering them into MetricFamilies for exposition.

Enums§

Endpoint
Requests will be logged by the type of endpoint hit This will include llamastack in the future
RequestType
Metrics for the HTTP service
Status
Status

Constants§

REQUEST_STATUS_ERROR
Value for the status label in the request counter if the request failed
REQUEST_STATUS_SUCCESS
Value for the status label in the request counter for successful requests
REQUEST_TYPE_STREAM
Partial value for the type label in the request counter for streaming requests
REQUEST_TYPE_UNARY
Partial value for the type label in the request counter for unary requests

Functions§

router
Create a new router with the given path