diff --git a/app/prometheus_unix.ml b/app/prometheus_unix.ml index eeecab9..5bd686b 100644 --- a/app/prometheus_unix.ml +++ b/app/prometheus_unix.ml @@ -65,6 +65,8 @@ let listen_prometheus = let opts = listen_prometheus +let config port = Some port + let () = let add (info, collector) = CollectorRegistry.(register default) info collector in diff --git a/app/prometheus_unix.mli b/app/prometheus_unix.mli index 6aeea48..ca27ae6 100644 --- a/app/prometheus_unix.mli +++ b/app/prometheus_unix.mli @@ -25,6 +25,10 @@ val opts : config Cmdliner.Term.t (** [opts] is the extra command-line options to offer Prometheus monitoring. *) +val config : int -> config +(** [config port] creates a new configuration for the metrics server. + Metrics will be served on port [port]. *) + (** Report metrics for messages logged. *) module Logging : sig val init :