-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#198 chore: add settings to api and refactor sentry settings
- Loading branch information
Showing
4 changed files
with
34 additions
and
17 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
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 |
---|---|---|
@@ -1,27 +1,27 @@ | ||
import os | ||
import sentry_sdk | ||
|
||
from django.conf import settings | ||
from sentry_sdk.integrations.django import DjangoIntegration | ||
from sentry_sdk.integrations.celery import CeleryIntegration | ||
from sentry_sdk.integrations.redis import RedisIntegration | ||
|
||
|
||
sentry_environment = os.environ.get("ENVIRONMENT", "Production") | ||
|
||
|
||
def init(): | ||
sentry_sdk.init( | ||
dsn=os.environ.get('SENTRY_DSN', ""), | ||
environment=sentry_environment, | ||
integrations=[CeleryIntegration(), | ||
DjangoIntegration(), | ||
RedisIntegration()], | ||
# sentry_sdk.init( | ||
# dsn=settings.SENTRY_DSN, | ||
# environment=settings.SENTRY_ENV, | ||
# integrations=[CeleryIntegration(), | ||
# DjangoIntegration(), | ||
# RedisIntegration()], | ||
|
||
# Set traces_sample_rate to 1.0 to capture 100% | ||
# of transactions for performance monitoring. | ||
# We recommend adjusting this value in production. | ||
traces_sample_rate=1.0, | ||
# # Set traces_sample_rate to 1.0 to capture 100% | ||
# # of transactions for performance monitoring. | ||
# # We recommend adjusting this value in production. | ||
# traces_sample_rate=1.0, | ||
|
||
# If you wish to associate users to errors (assuming you are using | ||
# django.contrib.auth) you may enable sending PII data. | ||
send_default_pii=True | ||
) | ||
# # If you wish to associate users to errors (assuming you are using | ||
# # django.contrib.auth) you may enable sending PII data. | ||
# # send_default_pii=True | ||
# ) | ||
pass |
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
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