Commit graph

9 commits

Author SHA1 Message Date
Tony Compton
fc88e6e57a Breaking down some more components, adding tests.
* Some bug fixes found during testing/test repair.
* Trying to tease apart the various responsibilities of `metricNamer` into smaller chunks and adding tests for each individual chunk.
* Updating the `provider_test` and `series_registry_test` to fix failures.
2018-07-19 10:53:48 -04:00
Tony Compton
76217a552b Some more adjustment.
* Breaking out some types to make the functionality more composable and easier to digest. (e.g. `basicMetricLister` interacts with Prometheus and `periodicMetricLister` periodically invokes `basicMetricLister`.
* Pulling out some of the type embedding between `basicSeriesRegistry` and `MetricLister` to make it easier to digest.
* Deleting the `/metric-converter` code because I'm pretty certain it's not going to be necessary as things transition to using the namer-based configuration.
* Some light-ish refactoring in `metricNamer` to get some re-use out of query generation in preparation for using it with external metrics.
2018-07-17 15:50:32 -04:00
Tony Compton
fe0859aa5c More implementation work in conversion.
Notable next steps include:
* Intelligently select the aggregation method (rate/avg_over_time/etc).
* Intelligenty select the aggregation window.
* Figure out how to handle "namespace", if at all.
* Fix the crazy type conversion in `sample_converter.go`.
2018-06-29 11:45:37 -04:00
Tony Compton
d90012439c Intermediate progress.
Working through some of the result conversions.
I want to use this code in a harness project to exercise some of it, but there are some versioning issues around my modified code vs. the current version of the real project. The easiest way to work around them at the moment is to push this.
2018-06-29 09:46:26 -04:00
Tony Compton
a69a5cbbcc Stubbing out metric converters. 2018-06-28 22:08:21 -04:00
Tony Compton
c30cc6c396 Undoing the rename of prometheusProvider to make it easier to focus on the new functionality. 2018-06-27 22:16:31 -04:00
Tony Compton
5533ff7580 A touch more work on GetExternalMetric.
Also added some comments for anyone reviewing this to help explain what I'm thinking.
2018-06-27 22:11:28 -04:00
Tony Compton
3727f99343 Moving the query building logic, adding first unit test.
Moving it into its own type to better organize and separate concerns. Also makes unit testing easier.
2018-06-27 21:37:21 -04:00
Tony Compton
e9af0455ba Re-implementing changes on top of the latest master. 2018-06-27 17:29:49 -04:00