Skip to content

[wip] metricstarttimeprocessor: add subtractinitial strategy implementation #38570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

ridwanmsharif
Copy link
Member

Description

For each resource, and for each timeseries:

  • Skip if the point is not a cumulative sum, histogram, exp histogram, or summary, or if it already has a start timestamp [WIP]
  • Lookup the timeseries in the cache. If it is not present, drop this point from the batch, and store the timestamp and value (including bucket counts, etc) in the cache.
  • Subtract cumulative values (e.g. sum, bucket counts) of the cached timeseries from the current timeseries, and set the start timestamp to the cached point's timestamp.
  • Detect resets [wip]

Link to tracking issue

Fixes #38382 and #38379

Testing

Unit tests added for the new strategy [wip]

Documentation

Read me updated [wip]

This change pulls out the starttimemetriccache to its own module so it
can be shared accross the adjuster.
@github-actions github-actions bot requested a review from dashpole March 12, 2025 04:11
@ridwanmsharif ridwanmsharif changed the title metricstarttimeprocessor: add subtractinitial strategy implementation [wip] metricstarttimeprocessor: add subtractinitial strategy implementation Mar 12, 2025
@ridwanmsharif
Copy link
Member Author

This PR is getting more complicated than I imagined. I'm abandoning it in favor of smaller PRs that do the following:

  • Decouple caching from the strategies. This should also fix the reset issue I am facing
  • Add implementation of the subtractinitial strategy

@ridwanmsharif
Copy link
Member Author

New attempt at this lives here: #38594

It will be made ready to review once #38579 and #38583 are merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[metricstarttimeprocessor] Factor start time cache out into generic cache
1 participant