CLOUD CONCEPT

Time Series

A time series is a sequence of observations indexed by time that represents how a measured quantity changes.

Cloud Concepts Hub →

What is Time Series

Time series organize measurements such as CPU utilization, request counts, and response latency so engineers can analyze trends, detect anomalies, and evaluate operational thresholds. Effective cloud monitoring depends on identifying each series correctly, choosing suitable collection and aggregation intervals, and balancing historical detail against storage and query costs.

A time series associates observations with timestamps. In operational monitoring, each observation usually contains a numeric value, while identifying attributes describe what was measured and where it originated. For example, CPU utilization sampled every minute for one virtual machine forms a time series. The same measurement for another virtual machine forms a different series. Samples can arrive regularly or irregularly; evenly spaced measurements are common, but they are not required by the concept.

Series identity is fundamental. Monitoring systems typically combine a metric name with attributes such as service, instance, environment, or region. In Amazon CloudWatch, within an AWS account and Region, a metric is uniquely identified by its namespace, metric name, and complete set of dimensions. A namespace groups related metrics, while dimensions are name-value pairs that distinguish series. For example, a custom namespace named Checkout, a metric named RequestLatency, and dimensions Environment=production and Operation=payment identify one metric. Changing or adding a dimension creates a different metric rather than updating descriptive metadata on the existing one.

This distinction affects aggregation. CloudWatch does not automatically aggregate custom metrics across dimension combinations. Publishing separate series for individual instances does not automatically create a dimensionless fleet-wide metric. Engineers must explicitly publish suitable aggregate metrics or query the individual series using supported mechanisms such as metric math or Metrics Insights. Some AWS services publish metrics with multiple dimension combinations, but this behavior should not be assumed for custom metrics.

Collection interval, storage resolution, and query period describe different choices. Collection interval determines how often a producer measures or sends data. Storage resolution determines the supported granularity of stored measurements. A query period groups observations into time windows for statistics. CloudWatch custom metrics support standard resolution of 60 seconds and high resolution of 1 second, selected through StorageResolution. Selecting high resolution does not make a producer collect more frequently; the producer must actually supply finer-grained measurements.

Aggregation changes what a chart or alarm reveals. A five-minute average can hide a ten-second CPU spike, whereas a maximum can expose it. For request counts published as interval totals, Sum usually answers how many requests occurred. For a cumulative counter, calculate an appropriate increase or rate while accounting for resets rather than summing successive counter readings. Latency percentiles can expose slow requests that averages conceal, but an average of instance-level percentiles is not a valid fleet-wide percentile. Preserve raw observations or a suitable distribution representation when percentile analysis is required.

Retention also changes available detail. CloudWatch retains data points with periods below 60 seconds for three hours, one-minute data for 15 days, five-minute data for 63 days, and one-hour data for 455 days. Older data is aggregated into coarser periods, so a long-term graph cannot recover the original second-level behavior. Export or independently retain measurements when investigations require longer access to fine-grained history.

Dimension design introduces a cost and scalability trade-off called cardinality: the number of distinct series. Stable attributes such as deployment environment and operation are often useful, while request IDs or unbounded customer identifiers can create excessive numbers of metrics. Keep detailed event context in logs and extract bounded operational measurements for metrics. Finally, missing data is not automatically zero: it might indicate an idle workload, a failed collector, delayed delivery, or a stopped resource. Align timestamps, synchronize clocks, and configure alarm missing-data behavior according to the measurement's meaning.

Key aspects of Time Series

Reliable time-series monitoring combines stable identities, appropriate temporal granularity, meaningful statistics, controlled cardinality, and explicit retention and missing-data policies.

Timestamped observations

Every observation is associated with a time, allowing comparisons across intervals and correlation with deployments or incidents. Use consistent timestamp conventions and synchronized clocks to reduce misleading ordering and alignment.

Explicit series identity

A metric name and its identifying attributes distinguish one series from another. In CloudWatch, namespaces and complete dimension sets are central to that identity within an account and Region.

Resolution and collection cadence

Fine-grained storage only helps when producers supply sufficiently frequent observations. Choose collection cadence, storage resolution, and alarm evaluation periods together so short incidents are observable.

Meaningful aggregation

Choose statistics according to the measurement: sums for interval counts, rates for cumulative counters, and averages or percentiles for suitable distributions. Aggregation across time and across resources must preserve the intended meaning.

Cardinality management

Every distinct identifying attribute combination can create another series. Use bounded operational dimensions and keep high-cardinality event identifiers in logs unless the monitoring backend and budget explicitly support them.

Retention and missing-data semantics

Downsampling reduces storage requirements but removes historical detail. Treat absent samples separately from measured zero values, especially when configuring alarms and diagnosing collector failures.

Cloud services for Time Series

CloudWatch collects AWS operational metrics and custom measurements for dashboards and alarms, while Amazon Managed Service for Prometheus supports Prometheus-based collection and querying. Amazon Managed Grafana can present both sources in shared dashboards, helping engineers compare application and infrastructure behavior. Amazon S3 can retain exported or independently collected measurements when historical analysis requires a different retention policy. Across these systems, consistent timestamps, compatible units, and deliberate dimension or label mappings are necessary; displaying series together does not automatically make their aggregation statistically valid.

Amazon CloudWatch image Amazon CloudWatch

Stores operational metrics as time series identified by namespaces, metric names, and dimensions, and evaluates them through statistics, dashboards, metric math, and alarms. Custom metrics support standard or high resolution, while retention progressively reduces historical granularity.

Open Amazon CloudWatch →
Amazon Managed Service for Prometheus image Amazon Managed Service for Prometheus

Stores and queries Prometheus-compatible metric time series identified by metric names and labels. PromQL supports operations such as counter rates and aggregation across selected labels, making label design and cardinality control important.

Open Amazon Managed Service for Prometheus →
Amazon Managed Grafana image Amazon Managed Grafana

Queries data sources such as CloudWatch and Amazon Managed Service for Prometheus to visualize time series in operational dashboards. It provides a visualization and analysis layer rather than serving as the primary metric storage backend.

Open Amazon Managed Grafana →
Amazon Simple Storage Service image Amazon S3

Can retain exported measurements or independently collected time-series datasets for longer-term analysis. Objects require a separate query or processing layer and are not directly equivalent to an operational metric store with built-in alarm evaluation.

Open Amazon S3 →