Skip to content

Commit

Permalink
Merge pull request #2054 from ccnmtl/sentry-js
Browse files Browse the repository at this point in the history
Update to new sentry config
  • Loading branch information
ndittren authored Oct 13, 2024
2 parents b4ecab4 + 69463fc commit 3bcd2cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
26 changes: 1 addition & 25 deletions carr/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,7 @@
<link rel="shortcut icon" href="{{STATIC_URL}}img/favicon.ico" type="image/x-icon" />
{% block css %}{% endblock %}

<script
src="https://js.sentry-cdn.com/bea76ad7e8124bc0ab1b4354fd9db56f.min.js"
crossorigin="anonymous"></script>
<script>
window.sentryOnLoad = function() {
Sentry.init({
{% if STAGING_ENV %}
environment: 'staging'
{% else %}
environment: 'production'
{% endif %}
});
{% if not request.user.is_anonymous %}
Sentry.setUser({
email: '{{request.user.email}}',
id: '{{request.user.username}}'
});
{% else %}
Sentry.setUser({
email: 'none',
id: 'anonymous'
});
{% endif %}
};
</script>
{% include "ctlsettings/sentry_js.html" %}

{% block js %}{% endblock %}

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pylibmc==1.6.3;sys_platform == "linux" and python_version<"3.9"
requirements/src/pylibmc-1.7.0.dev0-cp312-cp312-linux_x86_64.whl;sys_platform == "linux" and python_version>="3.12"
django-smtp-ssl==1.0

ctlsettings==0.3.5
ctlsettings==0.4.1
django-bootstrap3==24.3

pbr==6.1.0
Expand Down

0 comments on commit 3bcd2cb

Please sign in to comment.