This is the reblocks-prometheus Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 06:34:42 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
reblocks-prometheus
reblocks-prometheus/core
reblocks-prometheus/app
reblocks-prometheus/gauges/number-of-pages
reblocks-prometheus/gauges/number-of-sessions
reblocks-prometheus
This is an addon for Reblocks Common Lisp framework which allows to gather metrics in Prometheus format.
Alexander Artemenko
(GIT https://github.com/40ants/reblocks-prometheus)
Unlicense
<a id="x-28REBLOCKS-PROMETHEUS-DOCS-2FINDEX-3A-40README-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
# reblocks-prometheus - This is an addon for Reblocks Common Lisp framework which allows to gather metrics in Prometheus format.
<a id="reblocks-prometheus-asdf-system-details"></a>
## REBLOCKS-PROMETHEUS ASDF System Details
* Version: 0.1.0
* 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][0a5b]
* Bug tracker: [https://github.com/40ants/reblocks-prometheus/issues][8225]
* Source control: [GIT][d447]
[![](https://github-actions.40ants.com/40ants/reblocks-prometheus/matrix.svg?only=ci.run-tests)][1638]
![](http://quickdocs.org/badge/reblocks-prometheus.svg)
This is an addon for Reblocks Common Lisp framework which allows to gather
metrics in [Prometheus][df56] format.
<a id="x-28REBLOCKS-PROMETHEUS-DOCS-2FINDEX-3A-3A-40INSTALLATION-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## 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)
“‘
<a id="x-28REBLOCKS-PROMETHEUS-DOCS-2FINDEX-3A-3A-40USAGE-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## Usage
Inherit your Reblocks application from [‘prometheus-app-mixin‘][db0d] class:
“‘
(defapp app
:subclasses (reblocks-prometheus:prometheus-app-mixin)
:prefix "/")
“‘
A new route ‘/metrics‘ will be added to serve metrics in Prometheus format.
<a id="x-28REBLOCKS-PROMETHEUS-DOCS-2FINDEX-3A-3A-40API-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>
## API
<a id="x-28REBLOCKS-PROMETHEUS-2FAPP-3APROMETHEUS-APP-MIXIN-20CLASS-29"></a>
### [class](4fe6) ‘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‘][b3a2] to access the registry slot.
<a id="x-28REBLOCKS-PROMETHEUS-2FAPP-3ASTATS-REGISTRY-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-20REBLOCKS-PROMETHEUS-2FAPP-3APROMETHEUS-APP-MIXIN-29-29"></a>
### [reader](413d) ‘reblocks-prometheus/app:stats-registry‘ (prometheus-app-mixin) (= (make-registry))
[db0d]: #x-28REBLOCKS-PROMETHEUS-2FAPP-3APROMETHEUS-APP-MIXIN-20CLASS-29
[b3a2]: #x-28REBLOCKS-PROMETHEUS-2FAPP-3ASTATS-REGISTRY-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-20REBLOCKS-PROMETHEUS-2FAPP-3APROMETHEUS-APP-MIXIN-29-29
[0a5b]: https://40ants.com/reblocks-prometheus
[d447]: https://github.com/40ants/reblocks-prometheus
[1638]: https://github.com/40ants/reblocks-prometheus/actions
[4fe6]: https://github.com/40ants/reblocks-prometheus/blob/5311c8fb6ee3632847074844b7164e8f87fab02e/src/app.lisp#L31
[413d]: https://github.com/40ants/reblocks-prometheus/blob/5311c8fb6ee3632847074844b7164e8f87fab02e/src/app.lisp#L32
[8225]: https://github.com/40ants/reblocks-prometheus/issues
[df56]: https://prometheus.io/
* * *
###### [generated by [40ANTS-DOC](https://40ants.com/doc/)]
0.1.0
40ants-asdf-system
(system).
cffi-grovel
(system).
reblocks-prometheus/core
(system).
reblocks-prometheus/core
Alexander Artemenko
(GIT https://github.com/40ants/reblocks-prometheus)
Unlicense
reblocks-prometheus/app
(system).
reblocks-prometheus/app
Alexander Artemenko
(GIT https://github.com/40ants/reblocks-prometheus)
Unlicense
prometheus
(system).
prometheus.formats.text
(system).
prometheus.collectors.sbcl
(system).
prometheus.collectors.process
(system).
log4cl-extras/error
(system).
reblocks/session
(system).
reblocks/variables
(system).
reblocks-prometheus/gauges/number-of-pages
(system).
reblocks-prometheus/gauges/number-of-sessions
(system).
prometheus-gc
(system).
reblocks-prometheus/gauges/number-of-pages
Alexander Artemenko
(GIT https://github.com/40ants/reblocks-prometheus)
Unlicense
prometheus
(system).
reblocks/session
(system).
reblocks/page
(system).
Files are sorted by type and then listed depth-first from the systems components trees.
reblocks-prometheus/reblocks-prometheus.asd
reblocks-prometheus/core/file-type.lisp
reblocks-prometheus/app/file-type.lisp
reblocks-prometheus/gauges/number-of-pages/file-type.lisp
reblocks-prometheus/gauges/number-of-sessions/file-type.lisp
reblocks-prometheus/reblocks-prometheus.asd
reblocks-prometheus
(system).
reblocks-prometheus/core/file-type.lisp
reblocks-prometheus/core
(system).
reblocks-prometheus/app/file-type.lisp
reblocks-prometheus/app
(system).
initialize-instance
(method).
prometheus-app-mixin
(class).
stats-registry
(reader method).
*app*
(special variable).
/metrics
(function).
serve-stats
(generic function).
reblocks-prometheus/gauges/number-of-pages/file-type.lisp
collect
(method).
number-of-pages-gauge
(class).
reblocks-prometheus/gauges/number-of-sessions/file-type.lisp
number-of-anonymous-sessions-gauge
(class).
number-of-sessions-gauge
(class).
Packages are listed by definition order.
reblocks-prometheus/gauges/number-of-pages
reblocks-prometheus/app
reblocks-prometheus/gauges/number-of-sessions
reblocks-prometheus
reblocks-prometheus/gauges/number-of-pages
common-lisp
.
number-of-pages-gauge
(class).
reblocks-prometheus/app
common-lisp
.
prometheus-app-mixin
(class).
stats-registry
(generic reader).
*app*
(special variable).
/metrics
(function).
serve-stats
(generic function).
reblocks-prometheus/gauges/number-of-sessions
common-lisp
.
number-of-anonymous-sessions-gauge
(class).
number-of-sessions-gauge
(class).
Definitions are sorted by export status, category, package, and then by lexicographic order.
prometheus-app-mixin
)) ¶automatically generated reader method
number-of-pages-gauge
) cb) ¶prometheus
.
number-of-sessions-gauge
) cb) ¶prometheus
.
number-of-anonymous-sessions-gauge
) cb) ¶prometheus
.
prometheus-app-mixin
) &rest args) ¶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.
(prometheus:make-registry)
This slot is read-only.
Should return a string with metrics in Prometheus format.
prometheus-app-mixin
)) ¶prometheus-app-mixin
)) ¶gauge
.
Initarg | Value |
---|---|
:name | reblocks_anonymous_sessions_count |
:value | 0 |
:help | a number of anonymous session pages (where :user key is absent). |
gauge
.
Initarg | Value |
---|---|
:name | reblocks_pages_count |
:value | 0 |
:help | a number of nonexpired session pages. |
gauge
.
Initarg | Value |
---|---|
:name | reblocks_sessions_count |
:value | 0 |
:help | a number of non-anonymous session pages (where :user key is present). |
Jump to: | /
C F G I M S |
---|
Jump to: | /
C F G I M S |
---|
Jump to: | *
R S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*app* : | Private special variables | ||
| |||
R | |||
registry : | Public classes | ||
| |||
S | |||
Slot, registry : | Public classes | ||
Special Variable, *app* : | Private special variables | ||
|
Jump to: | *
R S |
---|
Jump to: | C F N P R S |
---|
Jump to: | C F N P R S |
---|