Summary
Exporting prometheus metrics.
This cube provides a pyramid tween that will, when active, collect the metrics
configured in the settings pyramid.ini and expose them on route /metrics.
Configuration
Include the metrics you want in pyramid.ini:
prometheus.pyramid.http_requests = True
prometheus.pyramid.current_requests = True
prometheus.pyramid.slow_routes = True
prometheus.pyramid.time_routes = True
prometheus.pyramid.count_routes = True
prometheus.cubicweb.sql.time = Histogram
prometheus.cubicweb.rql.time = Histogram
prometheus.uwsgi = True
prometheus.uwsgi.stats_url = http://127.0.0.1:1717
...
Using labels from CubicWeb debug channels
The RQL debug channel publish the data defined in querier.py.
Keys from the dict query_debug_information can be used as Prometheus labels
using the following syntax:
prometheus.cubicweb.rql.time.rql = Histogram
This will generate the following prometheus metrics with RQL query in labels rql.
rql_time_bucket{le="0.005",rql="Any X …"} 0.0
UWSGI metrics
Add stats (and stats-http if needed) on uwsgi.ini file to enable UWSGI
metrics (https://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html).
[uwsgi]
…
stats-http = true
stats = 127.0.0.1:1717
UWSGI will serve metrics on json format to 127.0.0.1:1717. Pyramid will read
this metrics and serve them along the rest of its data.
Release files for cubicweb-prometheus 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cubicweb_prometheus-0.7.1.tar.gz | 7.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cubicweb_prometheus-0.7.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.6 kB
Release files / cubicweb_prometheus-0.7.1.tar.gz
| Download URL | cubicweb_prometheus-0.7.1.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab61e1cd926333c3652ebcb2c05c9dff066d820436028a0b709aef04212ae1cc
|
|
BLAKE2b-256 checksum How to use checksums |
14b7d08653dcfb53f80d84d67d4b8d3c785f6b84cd138e3db613c9694bc6be7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / cubicweb_prometheus-0.7.1-py3-none-any.whl
| Download URL | cubicweb_prometheus-0.7.1-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
563f6e80292e3b1df000d52b6c01f44caad606d9006ecb450d9bcbdcf6e8142a
|
|
BLAKE2b-256 checksum How to use checksums |
2456aa33284df77013d3acced07eba3a7681f71ba4bca0901ba3fe611577855a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|