-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathotlp_metrics.h
More file actions
66 lines (53 loc) · 1.63 KB
/
Copy pathotlp_metrics.h
File metadata and controls
66 lines (53 loc) · 1.63 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef AGENTS_OTLP_SRC_OTLP_METRICS_H_
#define AGENTS_OTLP_SRC_OTLP_METRICS_H_
#include "metrics_exporter.h"
#include "opentelemetry/version.h"
// Class pre-declaration
OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk {
namespace instrumentationscope {
class InstrumentationScope;
} // namespace instrumentationscope
namespace metrics {
class PushMetricExporter;
} // namespace metrics
namespace resource {
class Resource;
} // namespace resource
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
namespace node {
namespace nsolid {
namespace otlp {
// Class pre-declaration
class OTLPAgent;
class OTLPMetrics final: public MetricsExporter {
public:
explicit OTLPMetrics(
uv_loop_t* loop,
OPENTELEMETRY_NAMESPACE::sdk::instrumentationscope::InstrumentationScope*,
const std::string& cacert);
explicit OTLPMetrics(
uv_loop_t* loop,
const std::string& url,
const std::string& key,
bool is_http,
OPENTELEMETRY_NAMESPACE::sdk::instrumentationscope::InstrumentationScope*,
const std::string& cacert);
virtual ~OTLPMetrics();
virtual void got_proc_metrics(const ProcessMetrics::MetricsStor& stor,
const ProcessMetrics::MetricsStor& prev_stor);
virtual void got_thr_metrics(
const std::vector<MetricsExporter::ThrMetricsStor>&);
private:
std::unique_ptr<OPENTELEMETRY_NAMESPACE::sdk::metrics::PushMetricExporter>
otlp_metric_exporter_;
OPENTELEMETRY_NAMESPACE::sdk::instrumentationscope::InstrumentationScope*
scope_;
std::string key_;
std::string url_;
};
} // namespace otlp
} // namespace nsolid
} // namespace node
#endif // AGENTS_OTLP_SRC_OTLP_METRICS_H_