'How to show filtered logs on GCP Monitoring Dashboard

On the Google Cloud monitoring mosaic, we have a card that shows logs. It's able to pre-filter on several fiels, for example the severity field screens logs below warning level as shown below. Is there a similar way filter on text? For example, I want the dashbaord to show only logs that match the text string "foobar". I've tried adding textPayload="foobar" to the Query Editor to no avail. Is this possible?

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source