Bird
0
0

How would you write a query to find logs from either Cloud Functions or App Engine with severity NOT equal to INFO?

hard📝 Application Q9 of 15
GCP - Cloud Monitoring and Logging
How would you write a query to find logs from either Cloud Functions or App Engine with severity NOT equal to INFO?
Aresource.type = "cloud_function" OR resource.type = "app_engine" AND severity != "INFO"
B(resource.type = "cloud_function" OR resource.type = "app_engine") AND severity != "INFO"
Cresource.type = "cloud_function" AND resource.type = "app_engine" AND severity != "INFO"
Dresource.type = "cloud_function" OR resource.type = "app_engine" AND severity = "INFO"
Step-by-Step Solution
Solution:
  1. Step 1: Group resource types with OR inside parentheses

    To select logs from either Cloud Functions or App Engine, group with parentheses.
  2. Step 2: Use AND with severity filter for NOT equal

    Use severity != "INFO" to exclude INFO severity logs.
  3. Final Answer:

    (resource.type = "cloud_function" OR resource.type = "app_engine") AND severity != "INFO" -> Option B
  4. Quick Check:

    Group OR conditions and combine with AND for exclusions [OK]
Quick Trick: Use != for NOT equal and parentheses for OR groups [OK]
Common Mistakes:
  • Missing parentheses causing wrong filter
  • Using AND instead of OR for resource types
  • Wrong severity operator

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes