reblocks-prometheus - This is an addon for Reblocks Common Lisp framework which allows to gather metrics in Prometheus format.
REBLOCKS-PROMETHEUS ASDF System Details
Description: This is an addon for Reblocks Common Lisp framework which allows to gather metrics in Prometheus format.
Licence: Unlicense
Author: Alexander Artemenko
Homepage: https://40ants.com/reblocks-prometheus
Bug tracker: https://github.com/40ants/reblocks-prometheus/issues
Source control: GIT
Depends on: log4cl-extras, prometheus, prometheus-gc, prometheus.collectors.process, prometheus.collectors.sbcl, prometheus.formats.text, reblocks
This is an addon for Reblocks Common Lisp framework which allows to gather metrics in Prometheus format.
Installation
You can install this library from Quicklisp, but you want to receive updates quickly, then install it from Ultralisp.org:
(ql-dist:install-dist "http://dist.ultralisp.org/"
:prompt nil)
(ql:quickload :reblocks-prometheus)
Usage
Inherit your Reblocks application from prometheus-app-mixin
class:
(defapp app
:subclasses (reblocks-prometheus:prometheus-app-mixin)
:prefix "/")
A new route /metrics
will be added to serve metrics in Prometheus format.
API
A mixin which gathers some stats to report in Prometheus format.
Also, this mixin adds a /metrics slot to the app.
Use stats-registry
to access the registry slot.