Google Cloud Error Reporting filtering errors

Viewed 400

I'm new to Google Cloud Error Reporting. As I understand til now, the error reporting is presenting information about all the logs stored in Google Cloud Stackdrive.

I wondering if it possible to limit Error Reporting to specific area?

For example,

  1. A specific logName
  2. All the logs containing a label

Because write now, it's holding all the possible exception that has been thrown in the system. It just too much. Also, some of the logs are from the development environment that should be ignored.

Is this possible to filtering Google Cloud Error Reporting?

Thanks!

1 Answers

Yes, you can search for the logs based on a specific filter in the same way you would in platform or Linux administration for log analytics.

For example, if I am searching for errors based on the resources of cloud functions with a severe flag error after 01-14-2021 at UTC 8:00 with a textPayload message of 429 quota I would search this in the Cloud Logging filter:

resource.type="cloud_function"
severity=ERROR
timestamp>="2021-01-14T00:00:00-08:00"
textPayload:"429 Quota"

You can change the fields accordingly and add/remove ones. Research what the interface is giving you and what you are trying to search for. Then take those and model to a filter.

Here is another example trying to remove unwanted error messages.

severity=ERROR
timestamp>="2021-01-16T00:00:00-08:00"
NOT protoPayload.status.message:"Already Exists: Dataset ga360-bigquery-azuredatalake"
NOT protoPayload.status.message:"Syntax error"
NOT protoPayload.status.message:"Not found"
NOT protoPayload.status.message:"Table name"
NOT textPayload:"project_transfer_config_path"
NOT protoPayload.methodName : "InsertDataset"
Related