Skip to main content

Emmett-Prometheus

Emmett-Prometheus is an Emmett framework extension integrating prometheus 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:

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):

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emmett_prometheus-0.3.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emmett_prometheus-0.3.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file emmett_prometheus-0.3.1.tar.gz.

File metadata

  • Download URL: emmett_prometheus-0.3.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for emmett_prometheus-0.3.1.tar.gz
Algorithm Hash digest
SHA256 6ff0aca545ed94b6f717c3109a4475148d7fb44e3b97c8f11116ea38259c2451
MD5 7ad2afc576c45eaa389a977f965020a8
BLAKE2b-256 b61069ca6e6d22671a05701673453b800a76d29395ccc1e6026b5e83a22660f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for emmett_prometheus-0.3.1.tar.gz:

Publisher: publish.yml on emmett-framework/prometheus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file emmett_prometheus-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for emmett_prometheus-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5621f67e772044a1dd138d36a2ae386092d3d67dbc080587f382e3fd8ce984b5
MD5 3b5a04470c0f6a9fa9be3c72060242f9
BLAKE2b-256 3a48156ce4da3366d8712899b34ecc3d88f588f699f1bffeae481935302e6e9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for emmett_prometheus-0.3.1-py3-none-any.whl:

Publisher: publish.yml on emmett-framework/prometheus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page