-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: disable transaction log decorator
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import sentry_sdk | ||
|
||
|
||
def disable_sentry_transaction_log(): | ||
""" | ||
Sentry transactions are the APM-side of sentry, and some recurring tasks will saturate our event quota without real | ||
value. For example, background jobs have no real value of being logged in sentry transactions and a lot ot them | ||
are run on a regular basis. | ||
""" | ||
|
||
with sentry_sdk.configure_scope() as scope: | ||
if scope.transaction: | ||
scope.transaction.sampled = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from setuptools import setup | ||
|
||
|
||
setup( | ||
name='mstd_sentry', | ||
version='0.0.1', | ||
description='', | ||
long_description='', | ||
author='Romain Dorgueil', | ||
author_email='romain@makersquad.fr', | ||
license='Apache Software License', | ||
packages=['mstd.sentry'], | ||
install_requires=[ | ||
"sentry-sdk ~= 1.5.2", | ||
], | ||
zip_safe=False, | ||
) |