diff options
author | Jon Bratseth <bratseth@gmail.com> | 2023-02-20 16:27:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 16:27:47 +0100 |
commit | d4348d2ba65eb120923c60eaddfff0e01420662d (patch) | |
tree | d0499fc27b74632aa86ac68dab834310ca49b620 /searchcore | |
parent | c4ddd4bd951d319437a38ead21037d9c17f1b70d (diff) | |
parent | c47df9df526a893664ef5fa2ae8fb731af82daae (diff) |
Merge pull request #26107 from vespa-engine/arnej/metric-for-proton-config-generation
add metric for current config generation
Diffstat (limited to 'searchcore')
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..9e9d51abd57 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()); |