The pr updates the way new labelset are applied to metrics collectors. Also, a collector is updated only if a new metric's labelset isn't a subset of the collector's labelset (there is/are new label(s) on the metric).
What this PR does / why we need it
When a metric is saved, it is checked that the metric's labels are a subset of the corresponding collector (if there is any) and if it isn't the case, the collector's labelset and stored metrics' labelsets are updated according to a new labelset (previous labels plus new labels from the metric about to store).
New labelsets for metrics collectors are sorted before applying.
Overview
The pr updates the way new labelset are applied to metrics collectors. Also, a collector is updated only if a new metric's labelset isn't a subset of the collector's labelset (there is/are new label(s) on the metric).
What this PR does / why we need it
When a metric is saved, it is checked that the metric's labels are a subset of the corresponding collector (if there is any) and if it isn't the case, the collector's labelset and stored metrics' labelsets are updated according to a new labelset (previous labels plus new labels from the metric about to store). New labelsets for metrics collectors are sorted before applying.
Special notes for your reviewer