Closed mvanderlee closed 6 months ago
When I was looking for an instrumentation for starlette, I knew about this package and now I am also wondering if I can just throw a Starlette app at it. I'll give it a try!
@chbndrhnns atm, I've been using my branch https://github.com/mvanderlee/prometheus-starlette-instrumentator/tree/no-fastapi
requirements.txt
git+https://github.com/mvanderlee/prometheus-starlette-instrumentator.git@da344ce83c5c40b70fd7f0b2fb33905d9498ee3c
setup.py
setup(
install_requires=[
'prometheus-fastapi-instrumentator @ git+https://github.com/mvanderlee/prometheus-starlette-instrumentator.git@da344ce83c5c40b70fd7f0b2fb33905d9498ee3c',
],
)
We have FastAPI installed anyway for another use case so it seems I am good to way with this version here, as well. Thanks for the link, though!
This project imports FastAPI simply to provide type hints. Moreover the middleware's function isn't limited to FastAPI and works fine with any Starlette implementation.
It'd be great if all code references to FastAPI could be replaced with Starlette.