2
0

metric.h 415 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <stdint.h>
  3. #include "client_metric.h"
  4. namespace prometheus {
  5. class Metric {
  6. public:
  7. enum class Type {
  8. Counter,
  9. Gauge,
  10. Summary,
  11. Histogram,
  12. Untyped,
  13. };
  14. Type type;
  15. Metric (Type type_) : type(type_) {}
  16. virtual ~Metric() = default;
  17. virtual ClientMetric Collect() const = 0;
  18. };
  19. } // namespace prometheus