{
  "slug": "dgim-exponential-histogram",
  "term": "Exponential histogram (DGIM)",
  "aliases": [
    "DGIM",
    "DGIM exponential histogram"
  ],
  "definition": "A DGIM exponential histogram approximates recent-stream counts using timestamped buckets whose sizes grow by powers of two.",
  "note": "The original counting problem concerns 1-bits among the latest N stream elements. Older equal-size buckets merge, retaining their more recent timestamp. Only the oldest surviving bucket may straddle the window boundary; its partial contribution is estimated. The paper derives a relative-count-error bound with O((1/epsilon) log^2 N) bits of memory. This is a deterministic approximation bound, not a sampling confidence interval. [dgim]\n\nHere, bucket size means a count of 1-bits, not a range of measured latencies. The similarly named OpenTelemetry representation partitions measurement magnitudes instead. Choosing either representation does not by itself specify wall-clock windows, handling of late events or the population to count.\n\nFor storage telemetry, first decide whether the question is how many events occurred recently or how measured durations were distributed. A stream position and a duration value are different coordinates.",
  "related": [
    "opentelemetry-exponential-histogram"
  ],
  "citations": [
    {
      "id": "dgim",
      "title": "Datar, Gionis, Indyk and Motwani. Maintaining Stream Statistics over Sliding Windows. SIAM J. Comput. 31(6):1794-1813 (2002), sections 1-2.",
      "url": "https://doi.org/10.1137/S0097539701398363",
      "accessed": "2026-11-20"
    }
  ],
  "status": "research",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-20"
}
