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

Optionally send Error-level logs to Cloud Error Reporting #13

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

fredvollmer
Copy link

@fredvollmer fredvollmer commented Aug 8, 2023

GCP Cloud Error Reporting aggregates application errors by root cause. It automatically scans Cloud Logging messages for anything that looks like an exception with a stack trace, but sometimes we want it to recognize error logs as well. Google supports this by setting the @type property of the log to a specific value.

This PR adds a new parameter that, when enabled, will cause the formatter to set the @type to this value for any log with a level of Error or higher. These logs will then be processed by Cloud Error Reporting.

Error Reporting overview:
https://cloud.google.com/error-reporting/docs/grouping-errors

Log Formatting documentation:
https://cloud.google.com/error-reporting/docs/formatting-error-messages#log-text

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