-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Core or SDK?
Platform/SDK
Which part? Which one?
https://docs.sentry.io/platforms/python/guides/asgi/
Description
Integrating with FastAPI with the following line throws various errors, depending on what is implemented
asgi_app = SentryAsgiMiddleware(asgi_app)Some errors could include:
@app.middleware("http")
AttributeError: 'SentryAsgiMiddleware' object has no attribute 'middleware'@app.on_event('shutdown')
AttributeError: 'SentryAsgiMiddleware' object has no attribute 'on_event'Integrating the middleware as described in the FastAPI docs fixes the problem:
asgi_app.add_middleware(SentryAsgiMiddleware)Suggested Solution
Update the documents with an example for FastAPI and/or a note that some ASGI middleware must be installed differently than shown in the example.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels