serp-prometheus
Prometheus metrics for Serpentine services, in
prometheus_client style.
from serp_fastapi import FastAPI, PlainTextResponse, Response
from serp_prometheus import CONTENT_TYPE_LATEST, Counter, Histogram, generate_latest
REQUESTS = Counter("http_requests_total", "Total HTTP requests.", ["method", "status"])
LATENCY = Histogram("request_seconds", "Request latency.")
app = FastAPI()
@app.get("/metrics")
def metrics() -> Response:
return PlainTextResponse(generate_latest().decode("utf-8"), media_type=CONTENT_TYPE_LATEST)
Values live in a process-global runtime store, so module-level metrics work and every worker thread reports into the same registry. Output is the Prometheus text format 0.0.4.
Caps: one global registry; no *_created samples or process collectors; labels() takes up
to four positional values.
Metadata
Release files for serp-prometheus 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| serp_prometheus-0.1.0.tar.gz | 5.9 kB | Without provenance | Details for serp_prometheus-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| serp_prometheus-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for serp_prometheus-0.1.0-py3-none-any.whl |
Total release size: 11.6 kB
Release files / serp_prometheus-0.1.0.tar.gz
| Download URL | serp_prometheus-0.1.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1054399fbdd9c516156e5779f39518087cba0b11ffd63cb0a05c53dc22fa0984
|
|
BLAKE2b-256 checksum How to use checksums |
5ba63dd4aa3572fb65ebef53c8502d71c8fcdb2842a53329b2ff273178f1fa19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / serp_prometheus-0.1.0-py3-none-any.whl
| Download URL | serp_prometheus-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ea53696c06b2da068c1c88f4e3a8e411c8bc19377d46263835f4b0b206e5942
|
|
BLAKE2b-256 checksum How to use checksums |
0ec77affc47571d67ddc6d533a351fc5cdbd7a6e2bf76eaec9fc98cd3a71c91b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for serp-prometheus 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.