unistat.h 753 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include <util/generic/fwd.h>
  3. #include <util/datetime/base.h>
  4. namespace NMonitoring {
  5. /// Decodes unistat-style metrics
  6. /// https://wiki.yandex-team.ru/golovan/stat-handle
  7. void DecodeUnistat(
  8. TStringBuf data,
  9. class IMetricConsumer* c,
  10. TStringBuf metricNameLabel = "sensor",
  11. TStringBuf metricNamePrefix = "",
  12. TInstant ts = TInstant::Zero());
  13. /// Assumes consumer's stream is open by the caller
  14. void DecodeUnistatToStream(
  15. TStringBuf data,
  16. class IMetricConsumer* c,
  17. TStringBuf metricNameLabel = "sensor",
  18. TStringBuf metricNamePrefix = "",
  19. TInstant ts = TInstant::Zero());
  20. } // namespace NMonitoring