aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/providers/common/metrics/sensors_group.h
blob: 1155fe38400a5210066b428ebb51162ca0a3f9c0 (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
#pragma once

#include <library/cpp/monlib/dynamic_counters/counters.h>


namespace NYql {
namespace NSensorComponent {
    static const TString kExecutor = "executor";
    static const TString kWorkerServer = "worker_server";
    static const TString kDataServer = "data_server";
    static const TString kInspectorClient = "inspector_client";
    static const TString kDq = "dq";
} // namspace NSensorComponent


using TSensorsGroup = ::NMonitoring::TDynamicCounters;
using TSensorsGroupPtr = TIntrusivePtr<TSensorsGroup>;

using TSensorCounter = NMonitoring::TCounterForPtr;
using TSensorCounterPtr = TIntrusivePtr<TSensorCounter>;


TSensorsGroupPtr GetSensorsRootGroup();

inline TSensorsGroupPtr GetSensorsGroupFor(const TString& compName) {
    static TString compLabel("component");
    return GetSensorsRootGroup()->GetSubgroup(compLabel, compName);
}

} // namspace NYql