livery_metrics (livery v0.2.0)
View SourcePrometheus /metrics handler.
Returns a handler that renders the instrument registry in Prometheus
text exposition format. Livery's livery_instrument_metrics middleware
already records HTTP server metrics into that registry; mount this on a
route to expose them:
R1 = livery_router:add('GET', <<"/metrics">>, livery_metrics:handler(), #{}, R0).The body and Content-Type
(text/plain; version=0.0.4; charset=utf-8) come from
instrument_prometheus. Requires the instrument application to be
running (it is, as a Livery dependency).
Summary
Functions
-spec handler() -> livery_middleware:handler().
Handler that exposes registered metrics in Prometheus format.