metrics-common
Shared Prometheus instrumentation for Sauron MCP servers.
-
instrument_tool_calls(mcp, service_name)— wraps every@mcp.tool(...)registered after this call with call-count and latency metrics. -
MetricsMiddleware— ASGI middleware that servesGET /metrics(Prometheus text exposition format) and records per-request count/latency for everything else. Wrap it as the outermost layer, e.g.:app = MetricsMiddleware(AuthMiddleware(mcp.streamable_http_app()), service_name="dynamics")
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metrics_common-0.1.0.tar.gz.
File metadata
- Download URL: metrics_common-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af851d4b5c67282523cb34204cf6fccb41aaabc393638e9d4de4f975d666765f
|
|
| MD5 |
0d77adb68014f07aa17f788d562e95b3
|
|
| BLAKE2b-256 |
7734d208556ab803eecc87ee3ae6eababe4da4714f4b9ddd8966da15122f782f
|
File details
Details for the file metrics_common-0.1.0-py3-none-any.whl.
File metadata
- Download URL: metrics_common-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2399e33ae7d24f50455d0cbdccc2c66058a2c1ab6f0bcf78bf6902c645e8bc72
|
|
| MD5 |
690c06e0dddc06d9bea9793e7951f787
|
|
| BLAKE2b-256 |
47c1ac60d502686bb65e82f3128ae7b79fa5a08ce17619bfcdb568d03c2ea026
|