Instrument your FastAPI with Prometheus metrics.
poetry update
.prometheus-client
dependency version constraint ^0.8.0
that only
allows versions in the range [0.8.0, 0.9.0[
. This is not correct and leads
to conflicts when you want to install the newest prometheus client library
version and this package. Switched to explicit contraints to ensure this
does not happen again.All changes are minor and non-breaking and mostly effect development only.
conftest.py
that provides utilities for testing.DEVELOPMENT.md
.tags
to method expose()
. Passthrough to FastAPI to support tagging. Raised by @chisaipete here.media_type
parameter is used to provide content type, the charset is appended
again automatically even if it already is part of Content-Type
.poetry update
and with that updated a few dependencies.fastapi = "0.38.1, <=1.0.0"
instead of fastapi = ">=0.38.1, <=1.0.0"
.
Thanks to @PaulFlanaganGenscape for rasing this issue
here.handler
and method
. It can be activated
with should_instrument_requests_inprogress
and configured with
inprogress_name
and inprogress_labels
. Check the autogenerated docs for
more info. Implementation not as nice as all the others because the metric
requires to be incremented before actually getting the response. This kind
of conflicts with the approach of this project. See
e62576e3640be0b677334537d27bc267ab0e91cf for the implementation commit.expose
method in the instrumentator ignores the endpoint
argument
and always creates the endpoint with the path /metrics
.
Variable was missing. Raised by @funkybase on 2020-09-24.