Medium1 markMultiple Choice
GCP ACE · Question 49 · Domain 5.3: Viewing audit logs
You are writing a query in the Logs Explorer to find all errors generated by a specific Cloud Function named 'process-data'.
Which TWO fields are essential to include in your query to filter the results accurately? (Select TWO)
You are writing a query in the Logs Explorer to find all errors generated by a specific Cloud Function named 'process-data'.
Which TWO fields are essential to include in your query to filter the results accurately? (Select TWO)
Answer options:
A.
resource.type="cloud_function"
B.
logName="cloudaudit.googleapis.com/activity"
C.
severity="ERROR"
D.
protoPayload.methodName="google.cloud.functions.v1.CloudFunctionsService.CallFunction"
E.
resource.labels.project_id="my-project"
How to approach this question
Understand the basic structure of a Cloud Logging query.
Full Answer
To find application errors for a specific service, you must filter by the `resource.type` (to isolate Cloud Functions) and the `severity` (to isolate ERRORs). You would also typically add `resource.labels.function_name="process-data"`.
Common mistakes
Querying audit logs instead of application logs when looking for code errors.
Practice the full GCP Associate Cloud Engineer Practice Exam 2
50 questions · hints · full answers · grading
More questions from this exam
Q01Your company is migrating to Google Cloud and needs to establish a resource hierarchy. You have t...EasyQ02You are managing access to a GCP project. You need to grant 15 developers the ability to view Com...MediumQ03You have created a new GCP project using the Cloud Console. You want to deploy a Cloud Function u...EasyQ04Your startup has a strict monthly cloud budget of $500. You want to be notified immediately if yo...EasyQ05Your finance team wants to perform complex SQL analysis on your GCP billing data to understand co...Medium
Expert