diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2020-12-14 17:27:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-14 17:27:55 +0300 |
commit | 0f8175dd3060691394e263cdab01c8f940b1b5d3 (patch) | |
tree | 4b14cd6b7e6ba7797eeec4c74b4c4c35cdad4494 /exporting/prometheus | |
parent | 7bfa8c8eba72a109d940b1fa5c7acaed9cd7a52c (diff) |
Kubernetes labels (#10107)
Co-authored-by: Markos Fountoulakis <markos.fountoulakis.senior@gmail.com>
Co-authored-by: Vladimir Kobal <vlad@prokk.net>
Diffstat (limited to 'exporting/prometheus')
-rw-r--r-- | exporting/prometheus/prometheus.c | 6 | ||||
-rw-r--r-- | exporting/prometheus/remote_write/remote_write.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/exporting/prometheus/prometheus.c b/exporting/prometheus/prometheus.c index 6b44488808..81a397aa34 100644 --- a/exporting/prometheus/prometheus.c +++ b/exporting/prometheus/prometheus.c @@ -283,8 +283,8 @@ void format_host_labels_prometheus(struct instance *instance, RRDHOST *host) int count = 0; rrdhost_check_rdlock(host); - netdata_rwlock_rdlock(&host->labels_rwlock); - for (struct label *label = host->labels; label; label = label->next) { + netdata_rwlock_rdlock(&host->labels.labels_rwlock); + for (struct label *label = host->labels.head; label; label = label->next) { if (!should_send_label(instance, label)) continue; @@ -301,7 +301,7 @@ void format_host_labels_prometheus(struct instance *instance, RRDHOST *host) count++; } } - netdata_rwlock_unlock(&host->labels_rwlock); + netdata_rwlock_unlock(&host->labels.labels_rwlock); } struct host_variables_callback_options { diff --git a/exporting/prometheus/remote_write/remote_write.c b/exporting/prometheus/remote_write/remote_write.c index bd7ff48f20..8f757fc223 100644 --- a/exporting/prometheus/remote_write/remote_write.c +++ b/exporting/prometheus/remote_write/remote_write.c @@ -156,8 +156,8 @@ int format_host_prometheus_remote_write(struct instance *instance, RRDHOST *host if (unlikely(sending_labels_configured(instance))) { rrdhost_check_rdlock(host); - netdata_rwlock_rdlock(&host->labels_rwlock); - for (struct label *label = host->labels; label; label = label->next) { + netdata_rwlock_rdlock(&host->labels.labels_rwlock); + for (struct label *label = host->labels.head; label; label = label->next) { if (!should_send_label(instance, label)) continue; @@ -169,7 +169,7 @@ int format_host_prometheus_remote_write(struct instance *instance, RRDHOST *host add_label(connector_specific_data->write_request, key, value); } - netdata_rwlock_unlock(&host->labels_rwlock); + netdata_rwlock_unlock(&host->labels.labels_rwlock); } return 0; |