diff --git a/src/pretix/settings.py b/src/pretix/settings.py index 3cbdf4ff1..42d9e1e45 100644 --- a/src/pretix/settings.py +++ b/src/pretix/settings.py @@ -716,6 +716,7 @@ if config.has_option('sentry', 'dsn') and not any(c in sys.argv for c in ('shell from .sentry import PretixSentryIntegration, setup_custom_filters SENTRY_TOKEN = config.get('sentry', 'traces_sample_token', fallback='') + SENTRY_ENABLE_LOGS = config.getboolean('sentry', 'enable_logs', fallback=False) pretix_denylist = DEFAULT_DENYLIST + [ "access_token", "sentry_dsn", @@ -740,7 +741,8 @@ if config.has_option('sentry', 'dsn') and not any(c in sys.argv for c in ('shell CeleryIntegration(), LoggingIntegration( level=logging.INFO, - event_level=logging.CRITICAL + event_level=logging.CRITICAL, + sentry_logs_level=logging.INFO, ) ], traces_sampler=traces_sampler, @@ -748,6 +750,7 @@ if config.has_option('sentry', 'dsn') and not any(c in sys.argv for c in ('shell release=__version__, event_scrubber=EventScrubber(denylist=pretix_denylist, recursive=True), send_default_pii=False, + enable_logs=SENTRY_ENABLE_LOGS, propagate_traces=False, # see https://github.com/getsentry/sentry-python/issues/1717 ) ignore_logger('pretix.base.tasks')