From a51b5a01df0681ec8fe78258476e1590ef5478ab Mon Sep 17 00:00:00 2001 From: Viswas Haridas <37623357+JustARatherRidiculouslyLongUsername@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:01:52 +0530 Subject: [PATCH] fix: remove sentry transaction sampling (#227) (cherry picked from commit a380b9f67473b900add91cafe99d4705ccb3b6d6) --- sage_desktop_api/sentry.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sage_desktop_api/sentry.py b/sage_desktop_api/sentry.py index 86e37c7b..f8ce3df8 100644 --- a/sage_desktop_api/sentry.py +++ b/sage_desktop_api/sentry.py @@ -13,22 +13,12 @@ def init(): send_default_pii=True, integrations=[DjangoIntegration()], environment=os.environ.get('SENTRY_ENV'), - traces_sampler=Sentry.traces_sampler, attach_stacktrace=True, before_send=Sentry.before_send, request_bodies='small', in_app_include=['apps.users', 'apps.workspaces', 'apps.mappings', 'apps.fyle', 'apps.sage300', 'apps.accounting_exports', 'fyle_rest_auth', 'fyle_accounting_mappings'], ) - @staticmethod - def traces_sampler(sampling_context): - # avoiding ready APIs in performance tracing - if sampling_context.get('wsgi_environ') is not None: - if 'ready/' in sampling_context['wsgi_environ']['PATH_INFO']: - return 0 - - return 1 - @staticmethod def before_send(event, hint): if 'exc_info' in hint: