reblocks-prometheus - This is an addon for Reblocks Common Lisp framework which allows to gather metrics in Prometheus format.
- 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.
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)
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.
class reblocks-prometheus/app:prometheus-app-mixin
()
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.