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

chore: consolidate error/warning logging #2341

Merged
merged 3 commits into from
Dec 12, 2024
Merged

Conversation

digitalcora
Copy link
Contributor

Various modules were "manually" implementing the key=value log format we use for Splunk searchability, and most errors or warnings were only being logged rather than reported to Sentry (where they are easier to organize and we can be proactively notified about them). This change consolidates all existing errors/warnings into a shared function that logs to both Logger and Sentry.

  • Sentry reports are also sent asynchronously, so they don't hold up returning a value to a client.

  • All errors/warnings are given a unique underscored identifier rather than a free-text message, which improves Splunk ergonomics.

Existing logging at info level and below is not changed, but would be a logical next step.

Various modules were "manually" implementing the `key=value` log format
we use for Splunk searchability, and most errors or warnings were only
being logged rather than reported to Sentry (where they are easier to
organize and we can be proactively notified about them). This change
consolidates all existing errors/warnings into a shared function that
logs to both `Logger` and Sentry.

* Sentry reports are also sent asynchronously, so they don't hold up
  returning a value to a client.

* All errors/warnings are given a unique underscored identifier rather
  than a free-text message, which improves Splunk ergonomics.

Existing logging at `info` level and below is not changed, but would be
a logical next step.
@digitalcora digitalcora marked this pull request as ready for review December 10, 2024 22:56
@digitalcora digitalcora requested a review from a team as a code owner December 10, 2024 22:56
Copy link
Contributor

@PaulJKim PaulJKim left a comment

Choose a reason for hiding this comment

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

Looks good!

@digitalcora digitalcora merged commit 5af3f61 into main Dec 12, 2024
11 checks passed
@digitalcora digitalcora deleted the cfg-sentry-logger branch December 12, 2024 21:52
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.

2 participants