unstale

pypi / prometheus-fastapi-instrumentator

prometheus-fastapi-instrumentator

What changed in prometheus-fastapi-instrumentator 7 to 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.

4 breaking5 new APIs and options2 behavior and defaults5 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.3 on npm

prometheus-fastapi-instrumentator 89 changes

Breaking changes 3

  • The middleware app parameter type changed from Starlette to ASGIApp.

    8.0.0release notes

  • The minimum required Python version increased from 3.8 to 3.10.

    8.0.0release notes

  • The required Starlette version range changed from >=0.30.0,<1.0.0 to >=1.0.0,<2.0.0.

    8.0.0release notes

New APIs and options 1

  • Adds an optional Instrumentator constructor parameter that includes the FastAPI app's effective root_path in the handler label of default exported Prometheus metrics when set to True; defaults to False.

    8.1.0release notes

Fixes and other changes 5

  • Fixes incorrect handling of nested apps and routes in some corner cases introduced with 8.0.1.

    8.1.0release notes

  • Fixes resolving route names when a FastAPI app has a root path set.

    8.1.0release notes

  • Replaces deprecated asyncio.iscoroutinefunction() with inspect.iscoroutinefunction() to avoid warnings on Python 3.12+.

    8.0.2release notes

  • Hitting mounts with slash redirection no longer collects the wrong handler name.

    8.0.1release notes

  • Route names for routers registered via include_router() on FastAPI 0.116+ now resolve through included routers to the leaf endpoint, preventing AttributeError on every request and reflecting the leaf endpoint in the Prometheus label.

    8.0.1release notes

prometheus-fastapi-instrumentator 77 changes

Breaking changes 1

New APIs and options 4

  • The constructor adds an opt-in flag to record duration without streaming.

    7.0.0release notes

  • The closure adds an opt-in flag to record duration without streaming.

    7.0.0release notes

  • Adds modified_duration_without_streaming, which instrumentation functions can use to set metrics.

    7.0.0release notes

  • The closure adds an opt-in flag to record duration without streaming.

    7.0.0release notes

Behavior and default changes 2

  • Its argument type is relaxed to HTTPConnection, allowing the function to get websocket route names as well.

    7.0.0release notes

  • Instrumentator now works with Starlette applications without requiring FastAPI.

    7.0.0release notes