diff --git a/src/sentry/eventstore/processing/__init__.py b/src/sentry/eventstore/processing/__init__.py index 04034c01126772..8666683109849c 100644 --- a/src/sentry/eventstore/processing/__init__.py +++ b/src/sentry/eventstore/processing/__init__.py @@ -1,3 +1,4 @@ +import sentry_sdk from django.conf import settings from sentry.eventstore.processing.base import EventProcessingStore @@ -14,11 +15,20 @@ settings.SENTRY_TRANSACTION_PROCESSING_STORE and settings.SENTRY_TRANSACTION_PROCESSING_STORE_OPTIONS ): - transaction_processing_store = LazyServiceWrapper( - EventProcessingStore, - settings.SENTRY_TRANSACTION_PROCESSING_STORE, - settings.SENTRY_TRANSACTION_PROCESSING_STORE_OPTIONS, - ) + try: + transaction_processing_store = LazyServiceWrapper( + EventProcessingStore, + settings.SENTRY_TRANSACTION_PROCESSING_STORE, + settings.SENTRY_TRANSACTION_PROCESSING_STORE_OPTIONS, + ) + except BaseException as e: + sentry_sdk.capture_exception(e) + transaction_processing_store = LazyServiceWrapper( + EventProcessingStore, + settings.SENTRY_EVENT_PROCESSING_STORE, + settings.SENTRY_EVENT_PROCESSING_STORE_OPTIONS, + ) + else: transaction_processing_store = LazyServiceWrapper( EventProcessingStore, @@ -26,4 +36,5 @@ settings.SENTRY_EVENT_PROCESSING_STORE_OPTIONS, ) + __all__ = ["event_processing_store", "transaction_processing_store"]