Skip to content

count precomputes accumulate sums, not counts #503

Description

@zaoxing

TBD

an ingested count precompute holds Σ values, so count_over_time reads return sums (correct only when samples are literally 1.0, e.g. event-per-sample counters), and the approximate avg_over_time pair (CMS-sum ÷ CMS-count) collapses to Σv/Σv = 1. My tests didn't trip this because they seed accumulators at the store layer ( cms() helper feeds counts directly), which validates the read path but bypasses apply_sample. The fix lives in step 2: dispatch on sub_type == "count" to a weight-1 updater variant for both CMS and MultipleSum, mirroring count_events.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions