Make Stackdriver main collector more library-friendly#157
Make Stackdriver main collector more library-friendly#157SuperQ merged 12 commits intoprometheus-community:masterfrom
Conversation
Signed-off-by: Pablo Balbi <pablo.l.balbi@gmail.com>
Signed-off-by: Pablo Balbi <pablo.l.balbi@gmail.com>
Signed-off-by: Pablo Balbi <pablo.l.balbi@gmail.com>
Signed-off-by: Pablo Balbi <pablo.l.balbi@gmail.com>
Co-authored-by: kgeckhart <kgeckhart@users.noreply.github.com> Signed-off-by: Pablo Balbi <pablo.l.balbi@gmail.com>
Co-authored-by: kgeckhart <kgeckhart@users.noreply.github.com> Signed-off-by: Pablo Balbi <pablo.l.balbi@gmail.com>
Co-authored-by: kgeckhart <kgeckhart@users.noreply.github.com> Signed-off-by: Pablo Balbi <pablo.l.balbi@gmail.com>
Co-authored-by: kgeckhart <kgeckhart@users.noreply.github.com> Signed-off-by: Pablo Balbi <pablo.l.balbi@gmail.com>
Signed-off-by: Pablo Balbi <pablo.l.balbi@gmail.com>
Signed-off-by: Pablo Balbi <pablo.l.balbi@gmail.com>
24ec49f to
d24d5cd
Compare
SuperQ
left a comment
There was a problem hiding this comment.
Seems reasonable to me. Minor comment about the gitignore.
|
We've talked about making more of our exporter collector packages interchangeable to allow more library use. We're trying to come up with a registration/config pattern for this. If you're interested in contributing, I would love to hear your thoughts. |
Signed-off-by: Pablo Balbi <pablo.l.balbi@gmail.com>
Definetely, feel free to tag me in any issue/thread were you are discussing. More than happy to contribute 😀 |
|
I didn't find an issue for it, so I opened prometheus/exporter-toolkit#92. |
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 Signed-off-by: Kyle Eckhart <kgeckhart@users.noreply.github.com>
We would like to use stackdriver_exporter as a library. The project is almost usable as a library as it is, though inside the main collectors code (
MonitoringCollector) some CLI flag are used from the global context.This PR does a couple of changes to make
MonitoringCollectormore suitable for library use:kingpinCLI flags in a same fileflags.go. This cleans the packagecollectors, making it only content the actual collector's code.MonitoringCollectorOptions, which will be used to send the newly created collector all required settings.monitoring.metrics-type-prefixesandmonitoring.filtersto themainpackage. Also for cleaning up thecollectorspackage.