Google Cloud Certified Associate Cloud Engineer Practice

Disable ads (and more) with a membership for a one time $2.99 payment

Prepare for the Google Cloud Certified Associate Cloud Engineer Exam with flashcards and multiple choice questions. Each question includes hints and explanations to help you study effectively. Get ready to pass your certification exam!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Your developers have been thoroughly logging everything that happens in the API. The API allows end users to request the data as JSON, XML, CSV, and XLS. Supporting all of these formats is taking a lot of developer effort. Management would like to start tracking which options are used over the next month. Without modifying the code, what's the fastest way to be able to report on this data at the end of the month?

  1. Create a custom counter logging metric that uses a regex to extract the data format into a label. At the end of the month, use the metric viewer to see the group by the label.

  2. Create a log sink that filters for rows that mention the data format. Export that to BigQuery, and run a query at the end of the month.

  3. Create a custom monitoring metric in code and edit the API code to set the metric each time the API is called.

  4. Export the logs to excel, and search for the different fields.

The correct answer is: Create a custom counter logging metric that uses a regex to extract the data format into a label. At the end of the month, use the metric viewer to see the group by the label.

Option B is incorrect because exporting to BigQuery and running a query at the end of the month would require modifying the code. Option C is incorrect because editing the API code to set a custom monitoring metric would also require modifying the code. Option D is incorrect because exporting the logs to excel and searching for different fields would be time consuming and not as efficient as using a custom counter logging metric. A custom counter logging metric allows for easy tracking and analysis of the data formats used without modifying the code.