Prometheus Tornado Instrumentator
A Tornado-focused Prometheus instrumentation library inspired by
trallnag/prometheus-fastapi-instrumentator.
The goal is to provide a Tornado-native user experience:
from prometheus_tornado_instrumentator import Instrumentator
Instrumentator().instrument(app).expose(app)
Installation
From PyPI:
pip install prometheus-tornado-instrumentator
From a local checkout:
uv pip install -e .
Quick Start
from tornado.web import Application, RequestHandler
from prometheus_tornado_instrumentator import Instrumentator
class HelloHandler(RequestHandler):
def get(self):
self.write({"message": "hello"})
app = Application([(r"/hello", HelloHandler)])
Instrumentator().instrument(app).expose(app)
This instruments registered Tornado handlers and exposes Prometheus scrape output
at /metrics by default.
Features
- Default Prometheus metrics for request count, request size, response size, and latency.
- Custom sync or async instrumentation functions.
- Custom metric namespace and subsystem.
- Custom Prometheus
CollectorRegistry. - Gzip support for metrics output.
- Regex-based handler exclusions.
- Dynamic route instrumentation for handlers added with
Application.add_handlers(). - Prometheus client multiprocess support through
PROMETHEUS_MULTIPROC_DIR.
Scope
This package instruments Tornado HTTP RequestHandler routes.
It does not provide FastAPI, Starlette, ASGI mounted-app, included-router, or websocket route semantics. See docs/parity.md for the upstream semantic-parity notes.
Documentation
Development
Use uv for local development:
uv sync --extra dev
uv run --extra dev python -m pytest -q
License
This project is licensed under the ISC License. See LICENSE.
This project is inspired by
trallnag/prometheus-fastapi-instrumentator,
which is also licensed under the ISC License. See NOTICE for the
initial upstream baseline.
Metadata
Release files for prometheus-tornado-instrumentator 0.1.2
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 |
|---|---|---|---|---|
| prometheus_tornado_instrumentator-0.1.2.tar.gz | 38.5 kB | With provenance | Details for prometheus_tornado_instrumentator-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prometheus_tornado_instrumentator-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for prometheus_tornado_instrumentator-0.1.2-py3-none-any.whl |
Total release size: 49.6 kB
Release files / prometheus_tornado_instrumentator-0.1.2.tar.gz
| Download URL | prometheus_tornado_instrumentator-0.1.2.tar.gz |
|---|---|
| Size | 38.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35b55ed14a0794985beae1545bd9d8be128ccb13b624d568f71dd5d0c3dffaa8
|
|
BLAKE2b-256 checksum How to use checksums |
4eae8f5bb33ca68d847319efa51ed45871f8723e30c358acf1bc4b9b374e4c58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.
Transparency logRelease files / prometheus_tornado_instrumentator-0.1.2-py3-none-any.whl
| Download URL | prometheus_tornado_instrumentator-0.1.2-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a67eca82e5d70a5eb61b1697b1537b8dd7128b2f84aa5e6b48c09867c0f66db
|
|
BLAKE2b-256 checksum How to use checksums |
adce335be3869d7feebe138fda910cbd10152856475af8dacce40ea1d3b74346
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.
Transparency logSecurity for prometheus-tornado-instrumentator 0.1.2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for prometheus_tornado_instrumentator-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.
Transparency logA 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.