-
Notifications
You must be signed in to change notification settings - Fork 101
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
Make Stackdriver main collector more library-friendly #157
Make Stackdriver main collector more library-friendly #157
Conversation
Signed-off-by: Pablo Balbi <[email protected]>
Signed-off-by: Pablo Balbi <[email protected]>
Signed-off-by: Pablo Balbi <[email protected]>
Signed-off-by: Pablo Balbi <[email protected]>
Signed-off-by: Pablo Balbi <[email protected]>
Co-authored-by: kgeckhart <[email protected]> Signed-off-by: Pablo Balbi <[email protected]>
Co-authored-by: kgeckhart <[email protected]> Signed-off-by: Pablo Balbi <[email protected]>
Co-authored-by: kgeckhart <[email protected]> Signed-off-by: Pablo Balbi <[email protected]>
Co-authored-by: kgeckhart <[email protected]> Signed-off-by: Pablo Balbi <[email protected]>
Signed-off-by: Pablo Balbi <[email protected]>
Signed-off-by: Pablo Balbi <[email protected]>
24ec49f
to
d24d5cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Definetely, feel free to tag me in any issue/thread were you are discussing. More than happy to contribute 😀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks!
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 <[email protected]>
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
MonitoringCollector
more suitable for library use:kingpin
CLI 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-prefixes
andmonitoring.filters
to themain
package. Also for cleaning up thecollectors
package.