-
Bob Van Landuyt authored
This makes labels order independent in a way similar to what the official Prometheus::Client now does: https://github.com/prometheus/client_ruby/blob/7d9d45f547ce56ccf06344ab089e67228ddb7431/lib/prometheus/client/data_stores/direct_file_store.rb#L169 It shouldn't matter what order the labels were in for every change to the metric's value or how the metrics were initialized. But since the values were written out in 2 arrays before it did. This works around that by sorting the label names and values alphabetically by label name before writing out the key of the metric into the file.
9ae32afe
Loading