Skip to content

Commit

Permalink
Sentry's Performance tracing (#4872)
Browse files Browse the repository at this point in the history
* Upgrade sentry-sdk

Co-authored-by: Arik Fraimovich <[email protected]>

* Move traces sample rate to configuration

Co-authored-by: Arik Fraimovich <[email protected]>

Co-authored-by: Arik Fraimovich <[email protected]>
  • Loading branch information
gabrieldutra and arikfr authored May 8, 2020
1 parent 57287b2 commit 9568c74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions redash/utils/sentry.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import sentry_sdk
from funcy import iffy
from sentry_sdk.integrations.flask import FlaskIntegration
Expand All @@ -6,6 +7,7 @@
from sentry_sdk.integrations.rq import RqIntegration
from redash import settings, __version__

TRACES_SAMPLE_RATE = float(os.environ.get('SENTRY_TRACES_SAMPLE_RATE', '0.0'))

NON_REPORTED_EXCEPTIONS = ["QueryExecutionError"]

Expand Down Expand Up @@ -33,6 +35,7 @@ def init():
RedisIntegration(),
RqIntegration(),
],
traces_sample_rate=TRACES_SAMPLE_RATE,
)


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RestrictedPython==5.0
pysaml2==4.8.0
pycrypto==2.6.1
funcy==1.13
sentry-sdk>=0.12.2,<0.13.0
sentry-sdk>=0.14.3,<0.15.0
semver==2.8.1
xlsxwriter==1.2.2
pystache==0.5.4
Expand Down

0 comments on commit 9568c74

Please sign in to comment.