diff options
author | Tor Brede Vekterli <vekterli@vespa.ai> | 2024-03-19 13:55:59 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@vespa.ai> | 2024-03-19 13:55:59 +0000 |
commit | fcb0026be71894d5582f2aade7ec2e5479812b13 (patch) | |
tree | 22a763cdb052a129e5b5bda7c68303575ef39935 /metrics | |
parent | 640698e35e89850801a5a4a88807e7cd2f71e32b (diff) |
Simplify sample emplacement
Diffstat (limited to 'metrics')
-rw-r--r-- | metrics/src/vespa/metrics/prometheus_writer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/metrics/src/vespa/metrics/prometheus_writer.cpp b/metrics/src/vespa/metrics/prometheus_writer.cpp index 27c509638b2..a8998839a4c 100644 --- a/metrics/src/vespa/metrics/prometheus_writer.cpp +++ b/metrics/src/vespa/metrics/prometheus_writer.cpp @@ -206,17 +206,17 @@ void PrometheusWriter::doneVisitingMetricSet(const MetricSet& set) { bool PrometheusWriter::visitCountMetric(const AbstractCountMetric& m, bool) { auto full_path = metric_to_path_ref(m.getName()); auto labels = as_prometheus_labels(m); - _samples.emplace_back(TimeSeriesSample{full_path, "count", labels, {m.getLongValue("count")}}); + _samples.emplace_back(full_path, "count", labels, m.getLongValue("count")); return true; } bool PrometheusWriter::visitValueMetric(const AbstractValueMetric& m, bool) { auto full_path = metric_to_path_ref(m.getName()); auto labels = as_prometheus_labels(m); - _samples.emplace_back(TimeSeriesSample{full_path, "count", labels, {m.getLongValue("count")}}); - _samples.emplace_back(TimeSeriesSample{full_path, "sum", labels, {m.getDoubleValue("total")}}); - _samples.emplace_back(TimeSeriesSample{full_path, "min", labels, {m.getDoubleValue("min")}}); - _samples.emplace_back(TimeSeriesSample{full_path, "max", labels, {m.getDoubleValue("max")}}); + _samples.emplace_back(full_path, "count", labels, m.getLongValue("count")); + _samples.emplace_back(full_path, "sum", labels, m.getDoubleValue("total")); + _samples.emplace_back(full_path, "min", labels, m.getDoubleValue("min")); + _samples.emplace_back(full_path, "max", labels, m.getDoubleValue("max")); return true; } |