Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor snapshots collector (prometheus-community#789)
- Move metric Desc to vars to aid in unused linter checks - Use new Collector interface - Add a util getURL func. Similar funcs are in most of the collectors. The only difference is typically what struct to unmarshal the JSON into. This func just returns []byte so that the caller can handle the unique data structure. This does not adjust the labels on the metrics. I want that to be handled separately to make sure the refactor itself matches existing behavior. Signed-off-by: Joe Adams <[email protected]>
- Loading branch information