-
Notifications
You must be signed in to change notification settings - Fork 176
Make app field optional in Flask, Starlette and FastAPI instrumentations #1228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deploying logfire-docs with Cloudflare Pages Cloudflare Pages
df85e15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it seems too hard to also apply the other fastapi instrumentation, at least comment about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have the app instance, how would I go about it to make the custom logic work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if request.app not in registry then check for a 'global' FastAPIInstrumentation next.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean modifying the patch function below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
Uh oh!
There was an error while loading. Please reload this page.
@alexmojaki As I told you, this only works if instrumentation happens before import.