diff --git a/collector/lib/collector.rb b/collector/lib/collector.rb index 92fe8c8..216d0d2 100644 --- a/collector/lib/collector.rb +++ b/collector/lib/collector.rb @@ -122,7 +122,9 @@ def prune_components # Generates metrics that don't require any interactions with varz or healthz def send_local_metrics - handler = Handler.handler(@historian, "collector", Config.index, Time.now.to_i) + # TODO: we're using an empty hash for the handler's varz, so this may cause problems if the varz + # provides information required for any tags (e.g. in the DEA handler). + handler = Handler.handler(@historian, "collector", Config.index, Time.now.to_i, {}) handler.send_latency_metric("nats.latency.1m", @nats_latency.value) end diff --git a/collector/spec/unit/collector_spec.rb b/collector/spec/unit/collector_spec.rb index 5682aeb..0cb8bbd 100644 --- a/collector/spec/unit/collector_spec.rb +++ b/collector/spec/unit/collector_spec.rb @@ -193,7 +193,7 @@ def send_local_metrics yield handler Collector::Handler.should_receive(:handler). - with(kind_of(Collector::Historian), "collector", 0, 1000). + with(kind_of(Collector::Historian), "collector", 0, 1000, {}). and_return(handler) collector.send_local_metrics