Medium1 markMultiple Choice
Domain 5.3: Viewing audit logsCloud LoggingLogs ExplorerQuerying

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)

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