Prometheus metrics exporter for Muffin framework
Project description
Muffin-Prometheus – Prometheus metrics exporter for Muffin framework
Requirements
python >= 3.7
Installation
Muffin-prometheus should be installed using pip:
pip install muffin-prometheus
Usage
Initialize and setup the plugin:
import muffin
import muffin_babel
# Create Muffin Application
app = muffin.Application('example')
# Initialize the plugin
# As alternative: babel = muffin_prometheus.Plugin(app, **options)
prometheus = muffin_prometheus.Plugin()
prometheus.setup(app, group_paths=['/api'])
Options
Name |
Default value |
Desctiption |
metrics_url |
"/dev/prometheus" |
HTTP Path to export metrics for Prometheus |
group_paths |
[] |
List of path’s prefixes to group. A path which starts from the prefix will be grouped |
You are able to provide the options when you are initiliazing the plugin:
prometheus.setup(app, metrics_url='/metrics', group_paths=['/views', '/api/v1', '/api/v2'])
Or setup it inside Muffin.Application config using the PROMETHEUS_ prefix:
PROMETHEUS_METRICS_URL = '/metrics'
PROMETHEUS_GROUP_PATHS = ['/views', '/api/v1', '/api/v2']
Muffin.Application configuration options are case insensitive
Bug tracker
If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/klen/muffin-prometheus/issues
Contributing
Development of the plugin happens at: https://github.com/klen/muffin-prometheus
Contributors
klen (Kirill Klenov)
License
Licensed under a MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file muffin-prometheus-1.0.3.tar.gz
.
File metadata
- Download URL: muffin-prometheus-1.0.3.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f512e18c4edaffcff0da985e8dd83f33ee4bc4c8158c9aefd87c481fa0d0ca7 |
|
MD5 | 6352e38000298b69a40fbf4cc8ca051c |
|
BLAKE2b-256 | 75a68bbf6af066f63cf858251917587c10852a77ec1f088d12f1ae9e163b68d2 |
File details
Details for the file muffin_prometheus-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: muffin_prometheus-1.0.3-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f23ac5fe31237590191777da554a646eba7138e6fbfcd1a8895d4bcdb8102301 |
|
MD5 | 9235fe236bf6f56405aaffbb5244a3e7 |
|
BLAKE2b-256 | 1867dee307fd47edbb6b0458bb50c1c8d26495fe436ef4f86f6ae63e5323b4a0 |