Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove sentry transaction sampling #171

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions ms_business_central_api/sentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.business_central', '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:
Expand Down
Loading