CHANGES:
-
Add a new
prometheus-eioserving package (@mtelvers @avsm #60)Prometheus_eio.callbackis a cohttp-eio handler that serves the
default registry at/metrics. It depends only onprometheus-reporter,
so no Lwt or cohttp-lwt code is linked into an Eio application. -
Add a new
prometheus-reporterpackage with the cohttp-free parts of
prometheus-app(@ulrikstrid @avsm #39 #46)Prometheus_reporterrenders the text format and registers the GC
collectors.Prometheus_reporter_unixadds the process start-time metric
and the Logs reporter.prometheus-appreexports both so existing code
keeps working. Applications can now serve the rendered metrics with
any web server of choice. -
Remove Lwt from the
prometheuscore (@mtelvers @avsm #60 #65)The deprecated Lwt functions are removed from the core package, and
CollectorRegistry.collectnow returns a snapshot directly.
Lwt collectors are all inprometheus-lwt, whose interface is unchanged
from the v1.4 release.Applications that collected via the core in an Lwt context should use
Prometheus_lwt.CollectorRegistry.collect. -
prometheus-app: addPrometheus_unix.configto build a configuration
without cmdliner (@avsm @talex5 requested by @Nymphium #44 #73) -
prometheus-app: allow serving a registry other than the default one.
(@avsm #54)Prometheus_app.Cohttp(S).callbackandPrometheus_unix.servetake an
optional?registryargument. -
prometheus-app: allow specifying the address as well as the port to bind
to with--listen-prometheus.As well as a bare port number, the option now accepts
tcp:HOST[:PORT]
(with IPv6 addresses in square brackets, and the port defaulting to 9090)
andunix:PATHfor domain sockets, in the same syntax ascapnp-rpc-unix.
(@rbjorklin @avsm @talex5 #51 #72)