Commit Graph

10 Commits

Author SHA1 Message Date
Aliaksandr Valialkin
b23fdf5bd7
gauge.go: add Set() method, which can be used for changing the gauge value without the need to pass callback to NewGauge() 2023-12-20 14:06:44 +02:00
Roman Khavronenko
9dc7358869
allow exposing meta information for registered metrics (#61)
* allow exposing meta information for registered metrics

New public method `ExposeMetadata` allows enabling exposition
of dummy meta-info for all exposed metrics across all Sets.

This feature is needed to improve compatibility
with 3rd-party scrapers that require meta information to be present.

This commit doesn't update exposition of default system/process
metrics to keep the list of changes small. This change should
be added in a follow-up commit.

https://github.com/VictoriaMetrics/metrics/issues/48

* cleanup

* wip

* wip

* wip

* wip

---------

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-12-19 02:36:54 +02:00
Aliaksandr Valialkin
4ca082233a
all: go fmt from Go1.19 2022-08-08 17:15:06 +03:00
Aliaksandr Valialkin
fd1ac75aa0 gauge.go: mention FloatCounter in Gauge docs
Updates https://github.com/VictoriaMetrics/metrics/issues/11
2020-07-05 17:49:52 +03:00
Aleksandr Razumov
42ee365914 all: fix typo lables -> labels (#3)
Thanks!
2019-09-30 00:06:17 +03:00
Aliaksandr Valialkin
b9f1652800 Marshal integer *_sum metric for Summary without scientific notation 2019-08-13 13:24:46 +03:00
Aliaksandr Valialkin
ebce157dde Add Set for controlling metric sets to be exported via WritePrometheus call 2019-06-01 23:18:41 +03:00
Aliaksandr Valialkin
6cd90960e1 Added GetOrCreateGauge to be consistent with Counter and Summary 2019-04-15 15:34:02 +03:00
Aliaksandr Valialkin
d8d17da673 Point to a Counter, which could be used as a gauge 2019-04-15 15:22:58 +03:00
Aliaksandr Valialkin
bfffe95d07 refactored and added tests 2019-04-11 13:03:32 +03:00