From fbafb9a4e924800e9aa2cd6ad91ab2bb70dbe1b7 Mon Sep 17 00:00:00 2001 From: David Buckley Date: Wed, 21 Aug 2024 18:01:41 +0100 Subject: [PATCH] make metrics from carbon-cache go via relay config --- lib/carbon/instrumentation.py | 2 +- lib/carbon/service.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/carbon/instrumentation.py b/lib/carbon/instrumentation.py index 5e4f83e44..49c9abcfb 100644 --- a/lib/carbon/instrumentation.py +++ b/lib/carbon/instrumentation.py @@ -170,7 +170,7 @@ def cache_record(metric, value): else: fullMetric = '%s.agents.%s-%s.%s' % (prefix, HOSTNAME, settings.instance, metric) datapoint = (time.time(), value) - cache.MetricCache().store(fullMetric, datapoint) + state.client_manager.sendDatapoint(fullMetric, datapoint) def relay_record(metric, value): diff --git a/lib/carbon/service.py b/lib/carbon/service.py index 0c0fb8948..5cd6bbb5d 100644 --- a/lib/carbon/service.py +++ b/lib/carbon/service.py @@ -87,6 +87,7 @@ def setupPipeline(pipeline, root_service, settings): setupRelayProcessor(root_service, settings) elif processor == 'write': setupWriterProcessor(root_service, settings) + setupRelayProcessor(root_service, settings) else: raise ValueError("Invalid pipeline processor '%s'" % processor)