Commit Graph

10 Commits

Author SHA1 Message Date
Aliaksandr Valialkin
fdfd428a62
Add Set.RegisterMetricsWriter() function for registering user-defined callbacks for arbitrary metrics generation in Prometheus text exposition format 2024-01-16 00:07:12 +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
17839691f2
Add UnregisterAllMetrics() and GetDefaultSet() functions
While at it, make sure that ListMetricNames() returns sorted list of the registered metrics
2022-10-25 10:59:37 +03:00
Aliaksandr Valialkin
c6c6640e5b
add RegisterSet() and UnregisterSet() functions for registering the set in metrics export via global WritePrometheus() call 2022-08-08 17:13:46 +03:00
Aliaksandr Valialkin
3306660b50 Reduce histogram buckets from 0.1 to 0.02 of the size for the current decimal exponent
Also increase upper bound for histogram range from 10^12 to 10^18
2019-11-25 13:08:44 +02:00
Aliaksandr Valialkin
839018719c Add Histogram.VisitNonZeroBuckets 2019-11-23 23:58:18 +02:00
Aliaksandr Valialkin
984b12dbb5 Add easy-to-use histograms 2019-11-23 00:16:38 +02:00
Aliaksandr Valialkin
6cd90960e1 Added GetOrCreateGauge to be consistent with Counter and Summary 2019-04-15 15:34:02 +03:00
Aliaksandr Valialkin
bf93e5d810 Added GetOrCreateSummary* 2019-04-11 14:03:30 +03:00
Aliaksandr Valialkin
bfffe95d07 refactored and added tests 2019-04-11 13:03:32 +03:00