From 9cdc5aceed59d96a41ab866d2e8f575bdca64d70 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Tue, 29 Mar 2022 08:41:19 -0700 Subject: [PATCH] hydra-queue-runner: log message before and after exporter is started This way, if something goes wrong between the two, it's easier to narrow down where the issue lies. --- src/hydra-queue-runner/hydra-queue-runner.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc index f20c8e73..062b0644 100644 --- a/src/hydra-queue-runner/hydra-queue-runner.cc +++ b/src/hydra-queue-runner/hydra-queue-runner.cc @@ -758,13 +758,15 @@ void State::run(BuildID buildOne) if (!lock) throw Error("hydra-queue-runner is already running"); + std::cout << "Starting the Prometheus exporter on port " << exposerPort << std::endl; + /* Set up simple exporter, to show that we're still alive. */ std::string metricsAddress{"127.0.0.1"}; prometheus::Exposer exposer{metricsAddress + ":" + std::to_string(metricsPort)}; auto exposerPort = exposer.GetListeningPorts().front(); exposer.RegisterCollectable(registry); - std::cout << "Starting the Prometheus exporter, listening on " + std::cout << "Started the Prometheus exporter, listening on " << "http://" << metricsAddress << ":" << exposerPort << "/metrics" << std::endl;