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.
Your DevOps team is instrumenting an e-commerce application to export custom metrics to Google Cloud Monitoring using the Cloud Monitoring API. A previous version of the application caused severe cardinality explosion and quota exhaustion in Cloud Monitoring.
You need to define a new custom MetricDescriptor and label schema that strictly adheres to Google Cloud specifications while preventing high cardinality and optimizing resource consumption. Which design strategy should you implement?
In Google Cloud Monitoring, a MetricDescriptor defines the schema and metadata for a specific metric type (for example, custom.googleapis.com/checkout/transaction_count). Each metric is uniquely identified by the combination of its metric type and specific key-value pairs for all labels defined in its descriptor. The LabelDescriptor dictates the key name and data type (STRING, BOOL, or INT64) for each dimension.
payment_method (e.g., credit_card, paypal) and status_code (e.g., 200, 500) keeps the total number of active time series manageable and prevents exceeding Cloud Monitoring API rate limits and memory quotas.STRING, BOOL, or INT64) and ensures valid label key syntax ([a-zA-Z][a-zA-Z0-9_]*).user_id, order_id, and transaction_id are redirected to Cloud Logging or distributed traces via Cloud Trace (or OpenTelemetry exemplars), where high-cardinality lookups are fully supported without inflating time series storage.Cloud Monitoring time series storage is optimized for time-series aggregation, not per-transaction record indexing. Separating metrics (telemetry aggregation) from logs and traces (event investigation) follows Google Cloud observability best practices.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.