Skip to content

Adjuster doesn't detect resets when individual bucket count decreases #38582

Closed
@ridwanmsharif

Description

@ridwanmsharif

Component(s)

processor/metricstarttime

What happened?

Description

When an individual bucket counter decreases but the total count and sum goes up, the adjuster doesn't recognize the reset:

if currentDist.Count() < tsi.histogram.previousCount || currentDist.Sum() < tsi.histogram.previousSum {

Steps to Reproduce

Consider a histogram with 2 buckets: the buckets with boundaries 0 < x < 1 and 1 < y < 2

And at time t I get a histogram point with the following bucket counts {10, 20}
and then at time t + x I get another point with the bucket counts {100, 19}

This should trigger a reset as the individual bucket counter should never be decreasing.

Collector version

latest

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

Log output

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions