-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathotlp_common.h
More file actions
80 lines (65 loc) · 2.29 KB
/
Copy pathotlp_common.h
File metadata and controls
80 lines (65 loc) · 2.29 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#ifndef AGENTS_OTLP_SRC_OTLP_COMMON_H_
#define AGENTS_OTLP_SRC_OTLP_COMMON_H_
#include "nsolid.h"
#include "nsolid/nsolid_metrics_types.h"
#include "opentelemetry/sdk/metrics/data/metric_data.h"
#include "opentelemetry/sdk/metrics/data/point_data.h"
#include "opentelemetry/sdk/resource/resource.h"
// Class pre-declaration
OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk {
namespace instrumentationscope {
class InstrumentationScope;
} // namespace instrumentationscope
namespace resource {
class Resource;
} // namespace resource
namespace trace {
class Recordable;
} // namespace trace
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
// Class pre-declaration
OPENTELEMETRY_BEGIN_NAMESPACE
namespace sdk {
namespace instrumentationscope {
class InstrumentationScope;
}
namespace logs {
class Recordable;
}
namespace trace {
class Recordable;
}
} // namespace sdk
OPENTELEMETRY_END_NAMESPACE
namespace node {
namespace nsolid {
namespace otlp {
OPENTELEMETRY_NAMESPACE::sdk::instrumentationscope::InstrumentationScope*
GetScope();
OPENTELEMETRY_NAMESPACE::sdk::resource::Resource* GetResource();
OPENTELEMETRY_NAMESPACE::sdk::resource::Resource* UpdateResource(
OPENTELEMETRY_NAMESPACE::sdk::resource::ResourceAttributes&&);
void fill_proc_metrics(std::vector<opentelemetry::sdk::metrics::MetricData>&,
const ProcessMetrics::MetricsStor& stor,
const ProcessMetrics::MetricsStor& prev_stor,
bool use_snake_case = true);
void fill_env_metrics(std::vector<opentelemetry::sdk::metrics::MetricData>&,
const ThreadMetrics::MetricsStor& stor,
bool use_snake_case = true);
void fill_http_histograms(
std::vector<opentelemetry::sdk::metrics::MetricData>&,
const ThreadMetrics::MetricsStor& stor,
SharedPointDataAttributes http_client_points,
SharedPointDataAttributes http_server_points,
bool use_snake_case = true,
uint64_t start_timestamp_ms = 0);
void fill_log_recordable(OPENTELEMETRY_NAMESPACE::sdk::logs::Recordable*,
const LogWriteInfo&);
void fill_recordable(OPENTELEMETRY_NAMESPACE::sdk::trace::Recordable*,
const Tracer::SpanStor&);
} // namespace otlp
} // namespace nsolid
} // namespace node
#endif // AGENTS_OTLP_SRC_OTLP_COMMON_H_