Professional Cloud DevOps Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
A DevOps team manages a microservices application running on Google Cloud where services emit structured JSON logs to Cloud Logging. The logs contain a response status code (jsonPayload.status), the name of the service (jsonPayload.service_name), and the execution duration in milliseconds (jsonPayload.latency_ms).
The team needs to implement observability solutions in Cloud Monitoring to fulfill two requirements:
Which custom log-based metric designs should the team configure in Cloud Logging?
Log-based metrics are user-defined or system-defined metrics in Cloud Logging that convert log stream data into time-series metrics ingested by Cloud Monitoring. User-defined log-based metrics support two core metric types: counter metrics and distribution metrics.
jsonPayload.latency_ms and aggregate them into configurable histogram buckets. Cloud Monitoring uses these distributions to calculate percentiles (such as p50, p95, and p99) and evaluate latency threshold alert policies.jsonPayload.status >= 500 increments a count each time a server error log is ingested. Adding a custom label that extracts jsonPayload.service_name partitions the count into distinct time series per service, allowing Cloud Monitoring to chart error rates and alert on spikes per microservice.This approach directly maps the data requirements to the native capabilities of Google Cloud Observability: continuous numeric distributions for statistical latency analysis and labeled counters for tracking discrete categorized event occurrences.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.