Skip to content

Commit

Permalink
Sentry JS: use username rather than id
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolas committed Oct 11, 2024
1 parent c6b7a4d commit 0dd535c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.4.1
====================
* Updated sentry JS config to use username instead of id.

0.4.0 (2024-10-10)
====================
* Added a custom context processor to make settings available in
Expand Down
4 changes: 2 additions & 2 deletions ctlsettings/templates/ctlsettings/sentry_js.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
{% if request.user.is_anonymous %}
Sentry.setUser({
email: 'none',
id: 'anonymous'
username: 'anonymous'
});
{% else %}
Sentry.setUser({
email: '{{ request.user.email }}',
id: '{{ request.user.username }}'
username: '{{ request.user.username }}'
});
{% endif %}
};
Expand Down

0 comments on commit 0dd535c

Please sign in to comment.