Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging: Make logging.info log to Sentry #5720

Closed
wants to merge 1 commit into from

Conversation

chrisbobbe
Copy link
Contributor

We have a log line

NotifTroubleshootingScreen: MailComposer reports a sent email.

that I'd thought was getting sent to Sentry, but apparently not. The line is meant to help us detect potential cases where the user thought they'd contacted support through the app, but we don't see an email on our side. We're not aware of such cases yet, but in principle it could happen.

Since it seems helpful to have a function for logging to Sentry at an "info" level, rewrite logging.info based on logging.warn and logging.error so it does that. That should cause that notif-troubleshooting line to go to Sentry.

The one other callsite of logging.info is redundant with a breadcrumb added with the same information; remove it and an unexplained test assertion about it.

We have a log line

  NotifTroubleshootingScreen: MailComposer reports a sent email.

that I'd *thought* was getting sent to Sentry, but apparently not.
The line is meant to help us detect potential cases where the user
thought they'd contacted support through the app, but we don't see
an email on our side. We're not aware of such cases yet, but in
principle it could happen.

Since it seems helpful to have a function for logging to Sentry at
an "info" level, rewrite `logging.info` based on `logging.warn` and
`logging.error` so it does that. That should cause that
notif-troubleshooting line to go to Sentry.

The one other callsite of `logging.info` is redundant with a
breadcrumb added with the same information; remove it and an
unexplained test assertion about it.
@chrisbobbe chrisbobbe requested a review from gnprice April 18, 2023 21:57
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this pull request Oct 5, 2023
…entry

An alternative approach to zulip#5720, to help us detect potential cases
where the user thought they'd contacted support through the app, but
we don't see an email on our side. (We're not aware of such cases
yet, but in principle it could happen.)

It seems probably fine to do it at the "warn" level rather than
"info". If someone sends one of these emails, it usually means
something's not quite right with notifications somewhere, making
"warn" probably at least as appropriate as "info" in more cases than
not.
gnprice pushed a commit to chrisbobbe/zulip-mobile that referenced this pull request Oct 5, 2023
…entry

An alternative approach to zulip#5720, to help us detect potential cases
where the user thought they'd contacted support through the app, but
we don't see an email on our side. (We're not aware of such cases
yet, but in principle it could happen.)

It seems probably fine to do it at the "warn" level rather than
"info". If someone sends one of these emails, it usually means
something's not quite right with notifications somewhere, making
"warn" probably at least as appropriate as "info" in more cases than
not.
@chrisbobbe
Copy link
Contributor Author

Closing as superseded by #5775.

@chrisbobbe chrisbobbe closed this Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant