-
Notifications
You must be signed in to change notification settings - Fork 219
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
Crash on starlette middleware in mount endpoints (StaticFiles) #1131
Comments
Seems like this was introduced in this commit: a5e6660 |
https://github.com/elastic/apm-agent-python/blob/master/elasticapm/contrib/starlette/__init__.py#L238 |
I get the same error when mounting a prometheus's ASGI app to |
Hi, we just hit this issue as well when mounting static files for e.g. the swagger UI and would be interested if the work on the the open PR is still ongoing as the apm client now breaks our app and we did not find a workaround so far. |
Hiya, @Sparkycz Any Updates on this? I have a customer eagerly awaiting this as well...the PR seems stalled? |
* Fix Starlette middleware - providing only static files closes #1131 * Fix failing tests * CHANGELOG Co-authored-by: Benjamin Wohlwend <beni@elastic.co> Co-authored-by: Colton Myers <colton.myers@gmail.com>
* Fix Starlette middleware - providing only static files closes elastic#1131 * Fix failing tests * CHANGELOG Co-authored-by: Benjamin Wohlwend <beni@elastic.co> Co-authored-by: Colton Myers <colton.myers@gmail.com>
Describe the bug: Elastic middleware crash on access to static files
Environment (please complete the following information)
The issue is happens when elastic running the function _get_route_name.
the middleware will try to loop over the routes where starlette will return None in some cases:
Starlette code that makes the issue:
The text was updated successfully, but these errors were encountered: