Skip to content

fix(deps): update dependency prometheus-fastapi-instrumentator to v7 - autoclosed

renovate requested to merge renovate/prometheus-fastapi-instrumentator-7.x into master

This MR contains the following updates:

Package Change Age Adoption Passing Confidence
prometheus-fastapi-instrumentator ^6.1.0 -> ^7.0.0 age adoption passing confidence

Release Notes

trallnag/prometheus-fastapi-instrumentator (prometheus-fastapi-instrumentator)


Compare Source

Major release with a single breaking change: Python 3.7 is not supported anymore. Beyond that, three improvements based on various pull requests.

  • Instrumentator now works without FastAPI. This is possible because every FastAPI app is also a Starlette app (but not the other way around). Or to be more specific: FastAPI uses Starlette for things like routing and middleware this package relies on. The change is backwards compatible, even type checkers like mypy should continue working. Thanks to @​mvanderlee for proposing this in #​280 and implementing it in #​288.

  • Middleware also records duration without streaming in addition to the already existing total latency (i.e. the time consumed for streaming is not included in the duration value). The differentiation can be valuable as it shows the time to first byte.

    This mode is opt-in and can be enabled / used in several ways: The Instrumentator() constructor, the metrics.default() closure, and the metrics.latency() closure now come with the flag should_exclude_streaming_duration. The attribute modified_duration_without_streaming has been added to the metrics.Info class. Instances of metrics.Info are passed to instrumentation functions, where the added value can be used to set metrics.

    Thanks to @​dosuken123 for proposing this in #​291 and implementing it in #​290.

  • Relaxed type of get_route_name argument to HTTPConnection. This allows developers to use the get_route_name function for getting the name of websocket routes as well. Thanks to @​pajowu for proposing and implementing this feature in #​276.

  • BREAKING: Dropped support for Python 3.7 which is has reached end-of-life.


📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.

  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Merge request reports