Skip to content
Snippets Groups Projects
Commit 03ae7c08 authored by Anselm Lingnau's avatar Anselm Lingnau 🐧
Browse files

chore: Changes for GlitchTip support.

We're changing from Sentry to GlitchTip, which is much less
resource-hungry and doesn't require a huge, expensive VM for
itself. This requires a few tweaks to the session initialisation code,
plus we add an error-generating view for testing.
parent ed2a4bfd
No related branches found
Tags 24.366.1
No related merge requests found
......@@ -435,16 +435,17 @@ if sentry_dsn is not None:
from sentry_sdk.integrations.django import DjangoIntegration
sentry_sdk.init(
dsn=os.getenv("SENTRY_DSN"),
dsn=sentry_dsn,
integrations=[
DjangoIntegration(),
],
auto_session_tracking=False,
environment=MODE,
# 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,
traces_sample_rate=os.getenv("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.
......
......@@ -41,7 +41,12 @@ class UsernameConverter(StringConverter):
register_converter(UsernameConverter, "username")
def trigger_error(request):
division_by_zero = 1 / 0
urlpatterns = [
path('glitchtip-debug-xyzzy/', trigger_error),
path('accounts/register/',
RegistrationView.as_view(form_class=RegistrationForm),
name='django_registration_register'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment