Skip to content

Conversation

@kschelonka
Copy link
Collaborator

@kschelonka kschelonka commented Dec 12, 2025

References:

[MNTOR-5173]

Description

If Sentry is initialized, add a Sentry transport to winston server logger. This will automatically forward any error-level logs to Sentry. There are currently application errors that are sent to GCP logging but not Sentry, so we aren't always alerted.

Follow-up work will be to audit and review errors as they come up, determining if the errors are informative, actionable, and appropriately leveled.

@kschelonka kschelonka changed the title feat(o11y): send server errors to Sentry by default feat(o11y): send manually logged server errors to Sentry by default Dec 12, 2025
@kschelonka kschelonka changed the title feat(o11y): send manually logged server errors to Sentry by default feat(o11y): send manually logged server errors to Sentry Dec 12, 2025
Copy link
Collaborator

@Vinnl Vinnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, though one question: does this also disable sending the logs to the console (since it removes transports.Console()? Wouldn't that still be useful, at least when developing locally? (OK that's two questions.)

@kschelonka
Copy link
Collaborator Author

It's not in the diff, but the sentryTransports includes transports.Console(). I realized there was a redundant if statement from the old pattern so I just updated it, which should also make it clearer

level: "info",
transports: sentryTransports,
// In GCP environments, use cloud logging instead of stdout.
// FIXME https://mozilla-hub.atlassian.net/browse/MNTOR-2401 - enable for stage and production
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is from before but it's showing up as new in the diff

@kschelonka
Copy link
Collaborator Author

I'm going to wait on merging this until after the 17th when we're more nimble. Likely we will want to do follow-up releases to adjust alert levels.

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.

3 participants