Skip to content

Commit

Permalink
Set release for Sentry.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar committed Jul 8, 2021
1 parent c062f66 commit adf1ff4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions kanmail/client/boot.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ if (window.KANMAIL_DEBUG && !window.KANMAIL_DEBUG_SENTRY) {
} else {
Sentry.init({
dsn: window.KANMAIL_SENTRY_DSN,
release: `kanmail-app@${window.KANMAIL_VERSION}`,
beforeSend(event, hint) {
const error = hint.originalException;
// Ignore "expected" network errors (logged serverside) and critical request nonce errors
Expand Down
2 changes: 2 additions & 0 deletions kanmail/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
SESSION_TOKEN,
)
from kanmail.settings.hidden import get_hidden_value
from kanmail.version import get_version


@event.listens_for(Engine, 'connect')
Expand All @@ -53,6 +54,7 @@ def default(self, obj) -> Union[str, int]:
else:
sentry_sdk.init(
dsn=get_hidden_value('SENTRY_DSN'),
release=f'kanmail-app@{get_version()}',
integrations=[FlaskIntegration()],
# Don't send stack variables, potentially containing email data
with_locals=False,
Expand Down

0 comments on commit adf1ff4

Please sign in to comment.