Application logs are in Cloud Logging. You need the count of all requests to endpoints matching /api/alpha/*. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Add a Cloud Logging counter metric for endpoint:/api/alpha/*..
Why this is the answer
The correct option is to add a Cloud Logging counter metric for endpoint:/api/alpha/. Cloud Logging metrics are designed for aggregating and counting log entries that match specific criteria, making them ideal for this use case. The endpoint field is a common log entry field for HTTP request paths, and the wildcard allows matching all paths under /api/alpha/. Exporting logs to Cloud Storage or Cloud Pub/Sub and then processing them manually would be less efficient and more complex than using a built-in Cloud Logging metric, which provides real-time aggregation and can be easily visualized in Cloud Monitoring.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed