diff options
Diffstat (limited to 'exporting/prometheus/remote_write/remote_write.c')
-rw-r--r-- | exporting/prometheus/remote_write/remote_write.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |