Skip to content

Commit

Permalink
Update to new sentry-js setup
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolas committed Oct 12, 2024
1 parent 632e723 commit 795e290
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 24 deletions.
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ lazy-object-proxy==1.10.0
wrapt==1.16.0
astroid==3.2.0
django-statsd-mozilla==0.4.0
raven==6.10.0
certifi==2024.8.30 # sentry-sdk
sentry-sdk==2.16.0
django-bootstrap3==24.3
Expand Down Expand Up @@ -115,7 +114,7 @@ linecache2==1.0.0
behave-django==1.5.0
django-ga-context==0.1.0

ctlsettings==0.3.4
ctlsettings==0.4.1

pbr==6.1.0
PyYAML>=3.10.0 # MIT
Expand Down
1 change: 1 addition & 0 deletions worth2/settings_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
'django.template.context_processors.request',
'django.contrib.messages.context_processors.messages',
'stagingcontext.staging_processor',
'ctlsettings.context_processors.env',
'gacontext.ga_processor'
],
},
Expand Down
24 changes: 2 additions & 22 deletions worth2/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
{# don't format a string of numbers as a phone number #}
<meta name="format-detection" content="telephone=no">

{% include "ctlsettings/sentry_js.html" %}

<script>
var STATIC_URL = '{{STATIC_URL}}';
</script>
Expand Down Expand Up @@ -192,28 +194,6 @@
</div>
</footer>

<script src="https://cdn.ravenjs.com/3.20.1/raven.min.js" crossorigin="anonymous"></script>
<script>
{% if not debug %}
Raven.config(
'https://[email protected]/103273'
).install();

{% if not user.is_anonymous %}
Raven.setUserContext({
email: '{{user.email}}',
id: '{{user.username}}'
});
{% else %}
Raven.setUserContext({
email: 'none',
id: 'anonymous'
});
{% endif %}
{% endif %}
</script>


{% if debug %}
<script data-main="{{STATIC_URL}}js/src/main.js"
src="{{STATIC_URL}}js/lib/require.js"></script>
Expand Down

0 comments on commit 795e290

Please sign in to comment.