package prometheus-app
Client library for Prometheus monitoring
Install
Dune Dependency
Authors
Maintainers
Sources
prometheus-1.2.tbz
sha256=83643a029a6b6de71d14034eee2e94feff1d08755c4a41d583dc1530ab555bcb
sha512=bbec7f0728b850b991ec50e76ef2c999341a9469ceaa11b68180f060150c4fe62f3dca87c13914ac331b3d7ef6e46256ae11466b607ecb60d00b8f284cab86b9
doc/prometheus-app.unix/Prometheus_unix/Logging/index.html
Module Prometheus_unix.Logging
Source
Report metrics for messages logged.
Source
val init :
?default_level:Logs.level ->
?levels:(string * Logs.level) list ->
?formatter:Format.formatter ->
unit ->
unit
Initialise the Logs library with a reporter that reports prometheus metrics too. The reporter is configured to log to stderr and the log messages include a timestamp and the event's source.
A server will typically use the following code to initialise logging:
let () = Prometheus_app.Logging.init ()
Or:
let () =
Prometheus_unix.Logging.init ()
~default_level:Logs.Debug
~levels:[
"cohttp.lwt.io", Logs.Info;
]
inc_counter level src
increments the count of messages logged by src
at level
. The reporter installed by init
calls this automatically, but you might want to use this if you use your own reporter instead.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>