summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorArne Juul <arnej@yahooinc.com>2023-02-19 21:39:51 +0000
committerArne Juul <arnej@yahooinc.com>2023-02-19 21:39:51 +0000
commit6fbe62ee9de7b58310375c3bb75b25852650fe82 (patch)
treea293cfe0ae96fc8bc7ce43a6e43204afb343931d /searchcore
parentd3bfe633c12b6efd34b23b4c2572fc23c3ad3283 (diff)
add metric for current config generation
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.h1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.cpp1
3 files changed, 3 insertions, 0 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp
index c2d09fa341b..7e9a5b0ee4a 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp
+++ b/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp
@@ -29,6 +29,7 @@ ContentProtonMetrics::ProtonExecutorMetrics::~ProtonExecutorMetrics() = default;
ContentProtonMetrics::ContentProtonMetrics()
: metrics::MetricSet("content.proton", {}, "Search engine metrics", nullptr),
+ configGeneration("config_generation", {}, "The oldest config generation used by this process", this),
transactionLog(this),
resourceUsage(this),
executor(this),
diff --git a/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.h b/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.h
index 127e32ada07..c82a6804380 100644
--- a/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.h
+++ b/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.h
@@ -41,6 +41,7 @@ struct ContentProtonMetrics : metrics::MetricSet
~SessionCacheMetrics() override;
};
+ metrics::LongValueMetric configGeneration;
TransLogServerMetrics transactionLog;
ResourceUsageMetrics resourceUsage;
ProtonExecutorMetrics executor;
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
index 54009ef60f4..34961414d57 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
@@ -796,6 +796,7 @@ Proton::updateMetrics(const metrics::MetricLockGuard &)
{
{
ContentProtonMetrics &metrics = _metricsEngine->root();
+ metrics.configGeneration.set(getConfigGeneration());
auto tls = _tls->getTransLogServer();
if (tls) {
metrics.transactionLog.update(tls->getDomainStats());