Page
Library
Module
Module type
Parameter
Class
Class type
Source
Add a new prometheus-eio serving package (@mtelvers @avsm #60)
Prometheus_eio.callback is a cohttp-eio handler that serves the default registry at /metrics. It depends only on prometheus-reporter, so no Lwt or cohttp-lwt code is linked into an Eio application.
Add a new prometheus-reporter package with the cohttp-free parts of prometheus-app (@ulrikstrid @avsm #39 #46)
Prometheus_reporter renders the text format and registers the GC collectors. Prometheus_reporter_unix adds the process start-time metric and the Logs reporter. prometheus-app reexports both so existing code keeps working. Applications can now serve the rendered metrics with any web server of choice.
Remove Lwt from the prometheus core (@mtelvers @avsm #60 #65)
The deprecated Lwt functions are removed from the core package, and CollectorRegistry.collect now returns a snapshot directly. Lwt collectors are all in prometheus-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: add Prometheus_unix.config to 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).callback and Prometheus_unix.serve take an optional ?registry argument.
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) and unix:PATH for domain sockets, in the same syntax as capnp-rpc-unix. (@rbjorklin @avsm @talex5 #51 #72)
Core/Lwt split:
Add a new prometheus-lwt metrics package. (@avsm @mtelvers @talex5 #66 #67 #68 #69, reviewed by @dinosaure)
This release is not a breaking change, but instead prepares for deprecation of Lwt in the core package so a future release can remove Lwt from the prometheus core. Users of the core's Lwt-typed functions should migrate to Prometheus_lwt now. Code using the new interface will keep working unchanged in future releases.
prometheus-lwt.gettime argument. Instead, this is provided once by the new Prometheus.init function, which is called automatically when using Prometheus_unix.To migrate existing code, add a dep on prometheus-lwt and rename following the deprecation warnings from the compiler.
Bug fixes:
%.17g (@samoht @talex5 #62). The text exposition formatter printed metric values with %f, so any magnitude below ~5e-7 was reported as 0.000000.Other changes:
Astring dependency (@talex5 #63).Asetmap dependency (@talex5 #64). This changes the types of LabelSetMap and MetricFamilyMap slightly, which might affect custom reporters.# TYPE rather than #TYPE in the output.Makefile target run tests (@talex5 #49).Add logging configuration (#29, @talex5). To configure a server to report counts for log messages:
let () = Prometheus_unix.Logging.init ()This installs a reporter that reports the number of messages logged by each log source and at each level. The reporter also displays the timestamp and log source with each message, which is a more suitable configuration for servers.
"%f" (#22, @toots)Gc.quick_stat for faster stats (#25, @talex5)Sample_set module to clean up the API a bit (#13, @talex5)Re rather than Str