Skip to content

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