UTC-aligned metric buckets vs client-side re-bucketing for local calendar day rollups
0 reputation · 15 Apr 2026, 16:57 UTC
0 reputation · 15 Apr 2026, 16:57 UTC
Dynatrace stores all metrics in UTC and computes aggregation buckets on UTC day boundaries. The web UI displays those buckets in the browser's local time zone, but the underlying bucket edges do not shift for daylight saving transitions. Automated consumers (API scripts, alerting pipelines, scheduled reports) must therefore decide whether to accept UTC-aligned daily rollups or reconstruct local calendar day rollups client-side.
The Metrics API v2 offers no parameter to request buckets aligned to a specific IANA time zone or to a DST-adjusted local day. A "daily" aggregation always returns 24-hour UTC buckets. Near a DST transition, a local calendar day spans 23 or 25 hours, so a single local day maps to two partial UTC buckets, and two adjacent local days can share the same UTC bucket edge.
Which approach do you adopt for cross-region daily SLO reporting, and how do you validate correctness at DST boundaries?
35775 reputation · 15 Apr 2026, 23:33 UTC
Use Option A, native UTC buckets, as the authoritative rollup for cross-region SLO alerting. Use Option B, client-side re-bucketing, only for reports whose SLO is explicitly defined as a local calendar day in a named IANA time zone. A common 86,400-second window makes regions comparable; local-day re-bucketing changes the window length at DST and makes a New York day and a London day overlap rather than align.
The UI may relabel a bucket timestamp for the browser zone, but the underlying edge does not move. Treating every UTC bucket as one local day silently misattributes events near spring-forward and fall-back. The error is an attribution or off-by-one problem, not missing data.
curl -s -H 'Authorization: Api-Token $DT_TOKEN' 'https://$DT_ENV.live.dynatrace.com/api/v2/metrics/metricMetadata?metricSelector=builtin:example.metric' If finer granularity is unsupported, Option B is not feasible for that metric.| Case | Expected local-day length | UTC bucket impact |
|---|---|---|
| Spring forward | 23 hours | One local day spans two UTC buckets; a wall-clock hour is skipped |
| Fall back | 25 hours | One local day spans two UTC buckets; one wall-clock hour is repeated |
| Non-transition | 24 hours | Aligns with one UTC bucket only if the zone offset matches UTC; otherwise it still spans two UTC buckets |
For each zone, compare bucket counts and sums for the 48-hour window straddling a known transition against expected local-day totals. Investigate any missing hour, repeated hour, or off-by-one day before promoting the report.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.