1) PromQL expressions from different sources are combined using or (duplicates dropped)
1) PromQL expressions used in variables discovery are combined as well using __name__=~"metric1|metric2" (duplicates dropped)
1) ValueMappings are combined
1) LegendCustomTemplate: the first used
1) InfoLabels are combined (duplicates dropped)
To implement this change, some refactoring was required(thus large files diff), but according to tests it hasn't broke anything.
Note that there are breaking changes of internal addSignal() function, which was never used directly AFAIK (some args moved to sourceMaps arg. UnmarshallJsonMulti() is used instead, which is kept the same
Add support for using multiple metricsSource at once by providing list instead of string in
unmarshallJsonMulti
:1) PromQL expressions from different sources are combined using
or
(duplicates dropped) 1) PromQL expressions used in variables discovery are combined as well using__name__=~"metric1|metric2"
(duplicates dropped) 1) ValueMappings are combined 1) LegendCustomTemplate: the first used 1) InfoLabels are combined (duplicates dropped)To implement this change, some refactoring was required(thus large files diff), but according to tests it hasn't broke anything.
Note that there are breaking changes of internal addSignal() function, which was never used directly AFAIK (some args moved to sourceMaps arg. UnmarshallJsonMulti() is used instead, which is kept the same