Skip to content

sentry-sdk stopped working with falcon 3+ asgi app #1946

@detoyz

Description

@detoyz

How do you use Sentry?

Sentry Saas (sentry.io)

Version

1.16.0

Steps to Reproduce

I created a test repo where the bug can be reproduced -> https://github.com/detoyz/sentry_falcon_asgi_bug . There are also details on how to setup project & reproduce the error.

However a small summary here:

  1. Install sentry-sdk 1.16.0
  2. Install falcon
  3. Init falcon.asgi.App() and try to use it via falcon-inspect-app
  4. See error from sentry's falcon patching middleware
  5. Downgrade sentry sdk to 1.15.0
  6. Your falcon.asgi.App() and falcon-inspect-app are working as expected

Expected Result

By using sentry-sdk anywhere in the code it should not break during runtime because of any falcon.asgi.App() isntances

Actual Result

Runtime errors while using falcon.asgi.App() isntances with sentry-sdk client

TypeError: _patch_prepare_middleware.<locals>.sentry_patched_prepare_middleware() takes from 0 to 2 positional arguments but 3 were given

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions