Merge branch 'hotfix/enable-pii' into develop
This commit is contained in:
commit
c60af4acc2
|
|
@ -343,6 +343,23 @@ LOGGING = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if not DEBUG and os.environ.get('SENTRY_DSN'):
|
||||||
|
import sentry_sdk
|
||||||
|
from sentry_sdk.integrations.django import DjangoIntegration
|
||||||
|
|
||||||
|
def before_send(event, hint):
|
||||||
|
user = event['user']
|
||||||
|
id = user['id']
|
||||||
|
event['user'] = {'id': id}
|
||||||
|
return event
|
||||||
|
|
||||||
|
sentry_sdk.init(
|
||||||
|
dsn=os.environ.get('SENTRY_DSN'),
|
||||||
|
integrations=[DjangoIntegration()],
|
||||||
|
send_default_pii=True,
|
||||||
|
before_send=before_send
|
||||||
|
)
|
||||||
|
|
||||||
if not DEBUG and os.environ.get('SENTRY_DSN'):
|
if not DEBUG and os.environ.get('SENTRY_DSN'):
|
||||||
import sentry_sdk
|
import sentry_sdk
|
||||||
from sentry_sdk.integrations.django import DjangoIntegration
|
from sentry_sdk.integrations.django import DjangoIntegration
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue