reblocks-prometheus

2023-10-21

This is an addon for Reblocks Common Lisp framework which allows to gather metrics in Prometheus format.

Upstream URL

github.com/40ants/reblocks-prometheus

Author

Alexander Artemenko

License

Unlicense
README

reblocks-prometheus - This is an addon for Reblocks Common Lisp framework which allows to gather metrics in Prometheus format.

REBLOCKS-PROMETHEUS ASDF System Details

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

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.

reader reblocks-prometheus/app:stats-registry (prometheus-app-mixin) (= (make-registry))


[generated by 40ANTS-DOC]

Dependencies (12)

  • 40ants-asdf-system
  • cffi
  • ci
  • doc
  • docs-builder
  • log4cl-extras
  • named-readtables
  • prometheus.cl
  • prometheus-gc
  • pythonic-string-reader
  • reblocks
  • rove
  • GitHub
  • Quicklisp