Skip to content
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

Normalize sums prior to exporting them #323

Merged
merged 4 commits into from
Mar 18, 2022

Conversation

dashpole
Copy link
Contributor

@dashpole dashpole commented Feb 11, 2022

This is based on the normalizesumsprocessor, but has a few differences:

  • Timeseries are garbage-collected if they are not used after 20 minutes to prevent it from leaking memory
  • It converts non-monotonic sums to gauges instead of keeping track of the latest and inserting resets when the value decreases.
  • It handles explicit reset points (where start time is after end time).

To implement garbage collection, i've extracted the cache out into its own package.

@dashpole dashpole force-pushed the normalize_sums branch 2 times, most recently from 1086209 to 1e29d45 Compare February 11, 2022 18:42
@dashpole dashpole marked this pull request as ready for review February 11, 2022 20:08
@dashpole dashpole requested a review from quentinmit February 11, 2022 20:19
exporter/collector/metricsexporter.go Outdated Show resolved Hide resolved
exporter/collector/metricsexporter.go Outdated Show resolved Hide resolved
@dashpole dashpole requested a review from aabmass March 14, 2022 16:13
exporter/collector/metrics.go Show resolved Hide resolved
exporter/collector/metrics.go Outdated Show resolved Hide resolved
exporter/collector/metrics_test.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants