Module notifier_metrics_handler

Exposes GET /metrics in Prometheus text-exposition format.

Behaviours: cowboy_handler, trails_handler.

Description

Exposes GET /metrics in Prometheus text-exposition format.

Thin trails wrapper around prometheus_http_impl:reply/1 (the same rendering logic prometheus_cowboy2_handler uses) — a dedicated module rather than pulling in prometheus_cowboy's own handler because that one expects a raw cowboy_router route, not a trails_handler, and this app's dispatch table is entirely trails-compiled (see erlang_notifier_app:start/2).

Always serves the default registry — this app doesn't use any other.

Function Index

init/2Cowboy entry point — renders the default registry via prometheus_http_impl.
trails/0trails route for /metrics.

Function Details

init/2

init(Req::cowboy_req:req(), State::term()) -> {ok, cowboy_req:req(), term()}

Cowboy entry point — renders the default registry via prometheus_http_impl.

trails/0

trails() -> trails:trails()

trails route for /metrics. Excluded from the OpenAPI tags Swagger UI groups by feature (Health, Tokens, ...) since this is operational, not part of the public API surface.


Generated by EDoc