Prometheus Client Library for Modern C++
Loading...
Searching...
No Matches
collectable.h
1#pragma once
2
3#include <vector>
4
5#include "prometheus/detail/core_export.h"
6
7namespace prometheus {
8struct MetricFamily;
9}
10
11namespace prometheus {
12
17class PROMETHEUS_CPP_CORE_EXPORT Collectable {
18 public:
19 virtual ~Collectable() = default;
20
22 virtual std::vector<MetricFamily> Collect() const = 0;
23};
24
25} // namespace prometheus
Interface implemented by anything that can be used by Prometheus to collect metrics.
Definition collectable.h:17
virtual std::vector< MetricFamily > Collect() const =0
Returns a list of metrics and their samples.