emmett-prometheus


Nameemmett-prometheus JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryPrometheus extension for Emmett framework
upload_time2024-10-13 21:27:11
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords emmett monitoring prometheus
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Emmett-Prometheus

Emmett-Prometheus is an [Emmett framework](https://emmett.sh) extension integrating [prometheus](https://prometheus.io) client.

Emmett-Prometheus is compatible both with Emmett and Emmett55.

## Installation

You can install Emmett-Prometheus using pip:

    pip install emmett-prometheus

And add it to your Emmett application:

```python
from emmett_prometheus import Prometheus

app.use_extension(Prometheus)
```

## Configuration

Here is the complete list of parameters of the extension configuration:

| param | default | description |
| --- | --- | --- |
| auto\_load | `True` | Automatically inject extension on routes and expose metrics |
| enable\_http\_metrics | `True` | Enable metrics collection on HTTP routes |
| enable\_ws\_metrics | `True` | Enable metrics collection on Websocket routes |
| enable\_sys\_metrics | `False` | Enable default Prometheus client system metrics collection |
| metrics\_route\_path | /metrics | Path for metrics route |
| metrics\_route\_hostname | | Hostname for metrics route |

You also have some additional customisations available (here we show the defaults):

```python
app.config.Prometheus.http_histogram_statuses = [200, 201]
app.config.Prometheus.http_histogram_exclude_methods = ["OPTIONS"]
app.config.Prometheus.http_histogram_buckets = [
    5, 35, 100, 200, 500, 1000, "INF"
]
app.config.Prometheus.exclude_routes = []
app.config.Prometheus.metrics_names={
    "http_counter": "emmett_request_count",
    "http_histogram": "emmett_request_latency",
    "ws_gauge": "emmett_websocket_gauge",
    "ws_recv_counter": "emmett_websocket_messages_recv_count",
    "ws_send_counter": "emmett_websocket_messages_send_count"
}
```

## License

Emmett-prometheus is released under BSD license.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "emmett-prometheus",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "emmett, monitoring, prometheus",
    "author": null,
    "author_email": "Giovanni Barillari <g@baro.dev>",
    "download_url": "https://files.pythonhosted.org/packages/cc/0d/c66e59e7ae1877ddfc762b8af7379574e1e740ba785855a298cd9d0a6988/emmett_prometheus-0.2.0.tar.gz",
    "platform": null,
    "description": "# Emmett-Prometheus\n\nEmmett-Prometheus is an [Emmett framework](https://emmett.sh) extension integrating [prometheus](https://prometheus.io) client.\n\nEmmett-Prometheus is compatible both with Emmett and Emmett55.\n\n## Installation\n\nYou can install Emmett-Prometheus using pip:\n\n    pip install emmett-prometheus\n\nAnd add it to your Emmett application:\n\n```python\nfrom emmett_prometheus import Prometheus\n\napp.use_extension(Prometheus)\n```\n\n## Configuration\n\nHere is the complete list of parameters of the extension configuration:\n\n| param | default | description |\n| --- | --- | --- |\n| auto\\_load | `True` | Automatically inject extension on routes and expose metrics |\n| enable\\_http\\_metrics | `True` | Enable metrics collection on HTTP routes |\n| enable\\_ws\\_metrics | `True` | Enable metrics collection on Websocket routes |\n| enable\\_sys\\_metrics | `False` | Enable default Prometheus client system metrics collection |\n| metrics\\_route\\_path | /metrics | Path for metrics route |\n| metrics\\_route\\_hostname | | Hostname for metrics route |\n\nYou also have some additional customisations available (here we show the defaults):\n\n```python\napp.config.Prometheus.http_histogram_statuses = [200, 201]\napp.config.Prometheus.http_histogram_exclude_methods = [\"OPTIONS\"]\napp.config.Prometheus.http_histogram_buckets = [\n    5, 35, 100, 200, 500, 1000, \"INF\"\n]\napp.config.Prometheus.exclude_routes = []\napp.config.Prometheus.metrics_names={\n    \"http_counter\": \"emmett_request_count\",\n    \"http_histogram\": \"emmett_request_latency\",\n    \"ws_gauge\": \"emmett_websocket_gauge\",\n    \"ws_recv_counter\": \"emmett_websocket_messages_recv_count\",\n    \"ws_send_counter\": \"emmett_websocket_messages_send_count\"\n}\n```\n\n## License\n\nEmmett-prometheus is released under BSD license.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Prometheus extension for Emmett framework",
    "version": "0.2.0",
    "project_urls": {
        "Funding": "https://github.com/sponsors/gi0baro",
        "Homepage": "https://github.com/emmett-framework/prometheus",
        "Issues": "https://github.com/emmett-framework/prometheus/issues",
        "Source": "https://github.com/emmett-framework/prometheus"
    },
    "split_keywords": [
        "emmett",
        " monitoring",
        " prometheus"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f1a55586c1b134ffabcc96768dc709cb94ef25cabbd70a0aa10c97a20508a0a",
                "md5": "9c526c849e37742a714b613f33335b37",
                "sha256": "3732ad877a894cef75ac93bd079c1a661dcb71755c938357fcb507bd59c5734c"
            },
            "downloads": -1,
            "filename": "emmett_prometheus-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9c526c849e37742a714b613f33335b37",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5432,
            "upload_time": "2024-10-13T21:27:09",
            "upload_time_iso_8601": "2024-10-13T21:27:09.831654Z",
            "url": "https://files.pythonhosted.org/packages/1f/1a/55586c1b134ffabcc96768dc709cb94ef25cabbd70a0aa10c97a20508a0a/emmett_prometheus-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cc0dc66e59e7ae1877ddfc762b8af7379574e1e740ba785855a298cd9d0a6988",
                "md5": "bef9f1536e87173676be3b649d406d53",
                "sha256": "c90e468c51bc43914ee09c11a47f812023dd2c3cbcc4e7c14d2ef92ddc4a45de"
            },
            "downloads": -1,
            "filename": "emmett_prometheus-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bef9f1536e87173676be3b649d406d53",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 4569,
            "upload_time": "2024-10-13T21:27:11",
            "upload_time_iso_8601": "2024-10-13T21:27:11.195992Z",
            "url": "https://files.pythonhosted.org/packages/cc/0d/c66e59e7ae1877ddfc762b8af7379574e1e740ba785855a298cd9d0a6988/emmett_prometheus-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-13 21:27:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sponsors",
    "github_project": "gi0baro",
    "github_not_found": true,
    "lcname": "emmett-prometheus"
}
        
Elapsed time: 0.87454s