Closed mvanderlee closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.79%. Comparing base (
885c80c
) to head (a1f989b
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi, thanks for proposing and implementing this
Note that it is not possible to remove any trace of FastAPI from the instrumentator, as the expose() method relies on FastAPI-specific parameters. I could remove it, but I would prefer to keep it backwards compatible.
Nevertheless I managed to remove the dependency on the fastapi package by dynamically checking if the app is Starlette or FastAPI instance and only importing fastapi, if it is a FastAPI app. I added the changes to your PR.
It should be backwards compatible
Nice, awesome work @trallnag!
What does this do?
This PR removes FastAPI and uses Starlette instead (which FastAPI extends).
Why do we need it?
This means that non-FastAPI projects don't have to install all it's dependencies.
Who is this for?
Non-FastAPI users
Linked issues
Fixes #280
Reviewer notes
--