Class TextFormatUtil
Object
TextFormatUtil
Utility methods for writing Prometheus text exposition formats.
This class provides low-level formatting utilities used by both Prometheus text format and OpenMetrics format writers. It handles escaping, label formatting, timestamp conversion, and merging of duplicate metric names.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MetricSnapshotsmergeDuplicates(MetricSnapshots metricSnapshots) Merges snapshots with duplicate Prometheus names by combining their data points.
-
Constructor Details
-
TextFormatUtil
public TextFormatUtil()
-
-
Method Details
-
mergeDuplicates
Merges snapshots with duplicate Prometheus names by combining their data points. This ensures only one HELP/TYPE declaration per metric family.
-