An application batches varied request durations into CloudWatch custom metrics. Developers need to calculate p99 without publishing each sample separately. How should the code represent each batch?
Show the answer
Correct answerA. Publish distinct durations in Values with their frequencies in Counts.
AWhy this is right: Values and Counts preserve each distinct duration and its frequency, allowing CloudWatch to calculate percentiles.
BWhy not this: A batch average discards the distribution and cannot reproduce the requests' p99.
CWhy not this: A maximum preserves only an extreme value; a dimension does not supply the missing sample distribution.
DWhy not this: A statistic set loses the distribution; varied samples generally do not meet CloudWatch's conditions for percentile retrieval.
Values and Counts retain the sample distribution needed for percentile calculations while batching repeated values. A statistic set generally cannot support percentiles for varied samples because it does not retain their distribution.