Unverified Commit 045a32e7 authored by mvdbeek's avatar mvdbeek
Browse files

Fix sentry in WSGI/ASGI context

We need to have initialised sentry before building the FastAPI app,
and if we postpone until after forking that won't work.
parent acee16c6
Loading
Loading
Loading
Loading
+11 −14
Original line number Diff line number Diff line
@@ -181,7 +181,6 @@ class SentryClientMixin:
                "CRITICAL",
            ], f"Invalid sentry event level '{self.config.sentry.event_level}'"

            def postfork_sentry_client():
            import sentry_sdk
            from sentry_sdk.integrations.logging import LoggingIntegration

@@ -195,8 +194,6 @@ class SentryClientMixin:
                integrations=[sentry_logging],
            )

            self.application_stack.register_postfork_function(postfork_sentry_client)


class ConfiguresGalaxyMixin:
    """Shared code for configuring Galaxy-like app objects."""