Skip to content

Commit

Permalink
Refactor snapshots collector (prometheus-community#789)
Browse files Browse the repository at this point in the history
- 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
sysadmind authored and jaimeyh committed Jun 14, 2024
1 parent 422dfac commit 3442340
Show file tree
Hide file tree
Showing 5 changed files with 227 additions and 253 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## master / unreleased

BREAKING CHANGES:

The flag `--es.snapshots` has been renamed to `--collector.snapshots`.

* [CHANGE] Rename --es.snapshots to --collector.snapshots #XXX

## 1.6.0 / 2023-06-22

BREAKING CHANGES:
Expand Down
Loading

0 comments on commit 3442340

Please sign in to comment.