Skip to content

5.11.0 / 2023-03-08

Compare
Choose a tag to compare
@github-actions github-actions released this 08 Mar 19:47
· 40 commits to master since this release

Minor release containing several fixes and a small enhancement. Fixes are related to multi process mode, a regression introduced with the previous release, and errors that started to occur with current versions of Starlette and FastAPI.

Ask or discuss anything quick about the release in the discussion #221.

Added

  • Adjusted the add() method to accept an arbitrary number of instrumentation functions as arguments instead of a single one. Non-breaking change. Implemented in pull request #230.

Fixed

  • Fixed multi process mode in expose() method that handles the /metrics endpoint. Due to reusing the registry assigned to the instrumentator it could lead to duplicated metrics. Now the endpoint follows recommendation from Prometheus client library documentation. Also improved multi process unit tests. Closed issue #228 and #227. Fixed in pull request #229.

  • Fixed NameError and "Duplicated timeseries..." errors that started to occur with latest versions of Starlette / FastAPI in combination with multiple middlewares. Instrumentation closures are now optional and the instrumentator handles this accordingly. Thanks to @alexted and others for reporting errors. Thanks to @frankie567 for pointing out the change in Starlette. Related to pull request #153 and issue #214. Closed issue #219. Done in pull request #220.

  • Added missing registry parameter to remaining metrics functions. This enables passing custom registry to other metrics functions than default. Related to pull request #153. Closed issue #219. Done in pull request #220.