* 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>
It is better to just log the error once if /proc/self/io cannot be opened,
without exposing additional counters.
The error message should contain directions on how to fix the error.
Updates https://github.com/VictoriaMetrics/metrics/issues/42
* linux process metrics: add error handling for metrics from `/proc/self/io`
* linux process metrics: address review feedback
* linux process metrics: restore error handling for self/stat metrics
* linux process metrics: implement self/io error check with `init` function
This reverts commit 55d5027c97e2484d3e2b63ec6eb54845a8f69227.
Reason for revert: the process_resident_memory_anonymous_bytes and process_resident_memory_pagecache_bytes metrics have been substituted
by more complete set of metrics in the commit 5a49bb8e88e070e43cbffaa68776259f11f6c053:
* process_resident_memory_anon_bytes
* process_resident_memory_file_bytes
* process_resident_memory_shared_bytes
Metrics are:
process_io_read_bytes_total - the number of bytes read via io syscalls such as read and pread
process_io_written_bytes_total - the number of bytes written via io syscalls such as write and pwrite
process_io_read_syscalls_total - the number of read syscalls such as read and pread
process_io_write_syscalls_total - the number of write syscalls such as write and pwrite
process_io_storage_read_bytes_total - the number of bytes read from storage layer
process_io_storage_written_bytes_total - the number of bytes written to storage layer