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

Refactor delta logic for library usage #190

Merged

Conversation

kgeckhart
Copy link
Contributor

@kgeckhart kgeckhart commented Jan 18, 2023

Follow up on #168 after attempting to use the collector in a library and realizing there were some issues with some fields needing to be exported on HistogramMetric and ConstMetric to make it work.

I noticed a few other things which I fixed up along the way

  • Dedicated package for delta support (the bulk of the diff)
  • Slimmed down the data stored in memory from the GCP Distribution
  • The CollectedMetric and CollectedHistogram structs were eliminated in favor of ConstMetric + ConstHistogram tracking the collection time
  • The consumer of ListMetrics(metricDescriptorName string) map[string][]*Collected<Metric|Histogram> doesn't need the map so this was simplified to ListMetrics(metricDescriptorName string) []*Const<Metric|Histogram>

I have another follow up to this which abstracts the the store implementation so it can be shared between Histograms and Counters but didn't want to pile too many things in to this.

@kgeckhart kgeckhart force-pushed the keckhart/delta-library-usage branch 3 times, most recently from c60e1f5 to 7748675 Compare January 18, 2023 02:28
@SuperQ
Copy link
Contributor

SuperQ commented May 25, 2023

This needs a rebase.

@kgeckhart kgeckhart force-pushed the keckhart/delta-library-usage branch from 7748675 to 95ff3ad Compare June 9, 2023 18:27
@SuperQ SuperQ requested a review from matthiasr June 11, 2023 16:18
collectors/fnv.go Outdated Show resolved Hide resolved
@kgeckhart kgeckhart force-pushed the keckhart/delta-library-usage branch from ab619ab to dabdb3d Compare June 23, 2023 15:46
@kgeckhart
Copy link
Contributor Author

@SuperQ could you take another look?

@SuperQ SuperQ merged commit 8a968dc into prometheus-community:master Dec 19, 2023
@SuperQ
Copy link
Contributor

SuperQ commented Dec 19, 2023

Sorry for the review delays, this exporter got lost in my inbox.

SuperQ added a commit that referenced this pull request Mar 7, 2024
* [FEATURE] Add projects query #243
* [ENHANCEMENT] Refactor delta logic for library usage #190

Signed-off-by: SuperQ <[email protected]>
@SuperQ SuperQ mentioned this pull request Mar 7, 2024
SuperQ added a commit that referenced this pull request Mar 7, 2024
* Release v0.15.0

* [FEATURE] Add projects query #243
* [ENHANCEMENT] Refactor delta logic for library usage #190

Signed-off-by: SuperQ <[email protected]>

* Bump Go modules.

Signed-off-by: SuperQ <[email protected]>

---------

Signed-off-by: SuperQ <[email protected]>
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