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 d6e1c1c commit 543cf83
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ idna==3.10
bcrypt==4.2.0
pynacl==1.5.0
paramiko==3.5.0
raven==6.10.0

sentry-sdk==2.16.0
chardet==5.2.0
Expand Down Expand Up @@ -102,7 +101,7 @@ django-s3sign==0.1.9
django-smtp-ssl==1.0
certifi==2024.8.30 # sentry-sdk

ctlsettings==0.3.5
ctlsettings==0.4.1

pbr==6.1.0
PyYAML>=3.10.0 # MIT
Expand Down
1 change: 1 addition & 0 deletions wardenclyffe/settings_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def route_for_task(self, task, args=None, kwargs=None):
'django.template.context_processors.request',
'django.contrib.messages.context_processors.messages',
'stagingcontext.staging_processor',
'ctlsettings.context_processors.env',
'gacontext.ga_processor',
'django.template.context_processors.csrf'
],
Expand Down
19 changes: 2 additions & 17 deletions wardenclyffe/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<link rel="shortcut icon" href="{{STATIC_URL}}img/favicon.png" type="image/x-icon" />
{% block css %}{% endblock %}

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

{% block js %}
{% include 'main/jquery.html' %}
<script src="{{STATIC_URL}}js/jquery.tablesorter.min.js" type="text/javascript"></script>
Expand Down Expand Up @@ -117,23 +119,6 @@ <h1 class="sr-only" role="presentation"> is produced by:</h1>

<script src="{{STATIC_URL}}js/lib/popper/popper.min.js"></script>
<script src="{{STATIC_URL}}js/lib/bootstrap/js/bootstrap.min.js"></script>
<script src="https://cdn.ravenjs.com/3.7.0/raven.min.js"></script>
<script>
Raven.config('https://[email protected]/100858', {
whitelistUrls: [/wardenclyffe\.ccnmtl\.columbia\.edu/]
}).install();
{% if not request.user.is_anonymous %}
Raven.setUserContext({
email: '{{request.user.email}}',
id: '{{request.user.username}}'
});
{% else %}
Raven.setUserContext({
email: 'none',
id: 'anonymous'
});
{% endif %}
</script>

<script>
jQuery(function($){
Expand Down

0 comments on commit 543cf83

Please sign in to comment.