blob: b8caff9ad2237a371f217e7215052bcec0a55180 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#pragma once
#include "pre_mon_page.h"
#include <library/cpp/monlib/metrics/metric_registry.h>
namespace NMonitoring {
// For now this class can only enumerate all metrics without any grouping or serve JSON/Spack/Prometheus
class TMetricRegistryPage: public TPreMonPage {
public:
TMetricRegistryPage(const TString& path, const TString& title, TAtomicSharedPtr<IMetricSupplier> registry)
: TPreMonPage(path, title)
, Registry_(registry)
, RegistryRawPtr_(Registry_.Get())
{
}
TMetricRegistryPage(const TString& path, const TString& title, IMetricSupplier* registry)
: TPreMonPage(path, title)
, RegistryRawPtr_(registry)
{
}
void Output(NMonitoring::IMonHttpRequest& request) override;
void OutputText(IOutputStream& out, NMonitoring::IMonHttpRequest&) override;
private:
TAtomicSharedPtr<IMetricSupplier> Registry_;
IMetricSupplier* RegistryRawPtr_;
};
}
|