-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: rename prometheus metrics that are supposed to be gauge (#693)
# Description As title. Closes #237. Also did a bunch of refactoring + removing unused metrics ## Related Issue If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request. ## Checklist - [ ] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [ ] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [ ] I have correctly attributed the author(s) of the code. - [ ] I have tested the changes locally. - [ ] I have followed the project's style guidelines. - [ ] I have updated the documentation, if necessary. - [ ] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed Please add any relevant screenshots or GIFs to showcase the changes made. ## Additional Notes Add any additional notes or context about the pull request here. --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project.
- Loading branch information
Showing
30 changed files
with
271 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,17 +9,17 @@ import ( | |
|
||
//go:generate go run go.uber.org/mock/[email protected] -source=interfaces.go -destination=mock_types.go -package=metrics | ||
|
||
type ICounterVec interface { | ||
type CounterVec interface { | ||
WithLabelValues(lvs ...string) prometheus.Counter | ||
GetMetricWithLabelValues(lvs ...string) (prometheus.Counter, error) | ||
} | ||
|
||
type IGaugeVec interface { | ||
type GaugeVec interface { | ||
WithLabelValues(lvs ...string) prometheus.Gauge | ||
GetMetricWithLabelValues(lvs ...string) (prometheus.Gauge, error) | ||
} | ||
|
||
type IHistogramVec interface { | ||
type Histogram interface { | ||
Observe(float64) | ||
// Keep the Write method for testing purposes. | ||
Write(*dto.Metric) error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.