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

Track delta metrics between scrapes #168

Conversation

kgeckhart
Copy link
Contributor

This PR introduces support for aggregating DELTA metrics in-memory. This implementation is somewhat based on #167 but with extra functionality which is intended to solve the problem identified here, #167 (comment).

I chose to inject interfaces for the delta and distribution stores at the Collector level to try to keep library friendliness intact, #157

I did as much as I could to explain the solution and the tradeoffs with aggregating deltas in this manner in the README.md. The bulk of the changes are in monitoring_metrics.go where I tried to obfuscate as much of the delta logic as possible.

Should hopefully resolve #116 and #25

@kgeckhart kgeckhart force-pushed the keckhart/track-delta-metrics-between-scrapes branch from dc1fcba to ffb190b Compare August 29, 2022 13:23
@SuperQ
Copy link
Contributor

SuperQ commented Sep 9, 2022

Thanks, I'll take a look at this soon.

To start, this needs a DCO sign-off. You can use git commit -s --amend to add it.

@kgeckhart kgeckhart force-pushed the keckhart/track-delta-metrics-between-scrapes branch from b26820c to aefd076 Compare September 9, 2022 14:03
@ahjmorton
Copy link

Hello @SuperQ / @kgeckhart, this looks like it solves a really important issue with the exporter where DELTA metrics seem pretty much unusable in certain cases.

Can I ask what is stopping it from being merged and if there is anything I can do to speed that up? This issue is making monitoring of some of our GCP dependencies a lot harder as the data is split into 2 places.

@kgeckhart
Copy link
Contributor Author

Hi @ahjmorton, I'll defer to @SuperQ for the review + merge side of things. I can say we have been running this version in production for a little over three weeks. Our largest exporter is tracking ~500k metrics without any noticeable issues.

Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits, but otherwise LGTM.

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
collectors/delta_counter.go Outdated Show resolved Hide resolved
collectors/delta_distribution.go Outdated Show resolved Hide resolved
@SuperQ
Copy link
Contributor

SuperQ commented Nov 22, 2022

CC @igorwwwwwwwwwwwwwwwwwwww, this may interest you.

@igorwwwwwwwwwwwwwwwwwwww

cc @T4cC0re

Co-authored-by: Ben Kochie <[email protected]>
Signed-off-by: kgeckhart <[email protected]>
Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

Handle DELTA metrics better
4 participants