diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2023-05-24 18:29:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-24 21:29:06 +0300 |
commit | 04742049a5b04ba5f4e6e7f13f8ab1ee1b34da8d (patch) | |
tree | c61072d9eda5d69d16dd87d1581e947bceed9292 /exporting/prometheus | |
parent | db535e9fd82d09d5101804ecb6a3e2a9208aacf0 (diff) |
Invert order in remote write (#15097)
Co-authored-by: ilyam8 <ilya@netdata.cloud>
Diffstat (limited to 'exporting/prometheus')
-rw-r--r-- | exporting/prometheus/remote_write/remote_write_request.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/exporting/prometheus/remote_write/remote_write_request.cc b/exporting/prometheus/remote_write/remote_write_request.cc index ecfa11fa8a..a628082d11 100644 --- a/exporting/prometheus/remote_write/remote_write_request.cc +++ b/exporting/prometheus/remote_write/remote_write_request.cc @@ -45,16 +45,16 @@ void add_host_info( label->set_name("__name__"); label->set_value(name); - label = timeseries->add_labels(); - label->set_name("instance"); - label->set_value(instance); - if (application) { label = timeseries->add_labels(); label->set_name("application"); label->set_value(application); } + label = timeseries->add_labels(); + label->set_name("instance"); + label->set_value(instance); + if (version) { label = timeseries->add_labels(); label->set_name("version"); @@ -118,10 +118,6 @@ void add_metric( label->set_name("chart"); label->set_value(chart); - label = timeseries->add_labels(); - label->set_name("family"); - label->set_value(family); - if (dimension) { label = timeseries->add_labels(); label->set_name("dimension"); @@ -129,6 +125,10 @@ void add_metric( } label = timeseries->add_labels(); + label->set_name("family"); + label->set_value(family); + + label = timeseries->add_labels(); label->set_name("instance"); label->set_value(instance); |