
Answer-first summary for fast verification
Answer: • In your application, create a metric with a metricKind set to GAUGE and a valueType set to DISTRIBUTION. • In Stackdriver's Metrics Explorer, use a Heatmap graph to visualize the metric.
To monitor HTTP latencies for all users without a load balancer using Stackdriver Monitoring: - Latency is a point-in-time measurement (e.g., response time per request), making `GAUGE` the appropriate `metricKind` as it captures instantaneous values. - A `DISTRIBUTION` `valueType` is essential because it records a histogram of latency values, enabling analysis of percentiles (e.g., p50, p95) to understand the full user experience distribution. - A `Heatmap` visualization effectively displays distribution data over time, highlighting latency patterns, outliers, and concentrations. Why other options are incorrect: - **A**: `DELTA` tracks changes over intervals (e.g., request counts), not instantaneous latencies. `DOUBLE` lacks distribution support. Stacked Bar graphs suit aggregated counts, not latency distributions. - **B**: `CUMULATIVE` is for monotonically increasing metrics (e.g., total requests), not per-request latencies. `DOUBLE` misses distribution. Line graphs show trends but not value distributions. - **D**: `METRIC_KIND_UNSPECIFIED` is invalid and discouraged. `INT64` cannot capture latency distributions. Stacked Area graphs aggregate values, masking individual latency experiences. Thus, option C is correct, as it uses `GAUGE` + `DISTRIBUTION` to capture latency histograms and a `Heatmap` for comprehensive visualization.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are managing an application that exposes an HTTP endpoint without a load balancer. HTTP response latency is critical for user experience. You need to monitor the HTTP latencies experienced by all users using Stackdriver Monitoring. What should you do?
A
• In your application, create a metric with a metricKind set to DELTA and a valueType set to DOUBLE. • In Stackdriver's Metrics Explorer, use a Stacked Bar graph to visualize the metric.
B
• In your application, create a metric with a metricKind set to CUMULATIVE and a valueType set to DOUBLE. • In Stackdriver's Metrics Explorer, use a Line graph to visualize the metric.
C
• In your application, create a metric with a metricKind set to GAUGE and a valueType set to DISTRIBUTION. • In Stackdriver's Metrics Explorer, use a Heatmap graph to visualize the metric.
D
• In your application, create a metric with a metricKind set to METRIC_KIND_UNSPECIFIED and a valueType set to INT64. • In Stackdriver's Metrics Explorer, use a Stacked Area graph to visualize the metric.