I have a series of Google Cloud Functions that may throw domain errors. They represent a failure to the customer but they do not mean a failure in the code execution. Example:
If you go the path using Dashboard UI, you need to go to Logging > Logs Explorer then use the built-in filters to suit your preference. Here is where you define your code to cater what you need to filter out. I attached a link as reference.[1] MQL is more appropriate with Metrics than with Logs, but if you have used metrics from your logs, then you can use MQL to further refine your metrics queries. Here is a documentation link to help your use case if you choose MQL [2]
[1] https://cloud.google.com/logging/docs/view/logs-explorer-interface
I'd like to go with MQL but as I mentioned, with the built-in queries, when I filter all functions with error, it returns every error, including the predicted ones. My difficulty is to filter out the predicted errors, and not using MQL editor itself.