* 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>
The change covers two things:
1. Cleanup of Set.a metrics list from per-quantile metrics
for summary.
2. Register summary metric and per-quantile metrics in one take.
This prevents registry corruption when Unregister called in the
middle of metric register process.
* Allow unregistration of metrics
* Provide metrics.WritePrometheusSet to write using a dedicated metric set
* Cleanup unregister metrics patch, add generic WriteProcessMetrics
* Add new type of counter: FloatCounter
* sometimes you need to count things with more precision than uint64
* FloatCounter also usefull if you need setable Gauge w/o callback func
* Fix PR review:
* sync.RWMutex -> sync.Mutex
* more idiomatic add/sub