Writing the query in the GCP Logs Explorer with a regular expression (RegEx) as the filter:
I need to filter the query_name for any string that has the word ¨stat" in it.
Tried to no avail:
logName="projects/my_project/logs/my_env-production"
labels.query_name RLIKE "stat"
logName="projects/my_project/logs/my_env-production"
labels.query_name LIKE "%stat%"
logName="projects/my_project/logs/my_env-production"
labels.query_name="%stat%"
The output is No data found
on the left pane, and the output list is empty.
You need to use the same trick that is also used in Logs-Based Metrics or even in Grafana if you want to filter for RegEx.