/
event.proto
240 lines (203 loc) · 4.45 KB
/
event.proto
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
syntax = "proto3";
package event;
import "google/protobuf/timestamp.proto";
message EventArray {
oneof events {
LogArray logs = 1;
MetricArray metrics = 2;
TraceArray traces = 3;
}
}
message LogArray {
repeated Log logs = 1;
}
message MetricArray {
repeated Metric metrics = 1;
}
message TraceArray {
repeated Trace traces = 1;
}
message EventWrapper {
oneof event {
Log log = 1;
Metric metric = 2;
Trace trace = 3;
}
}
message Log {
// Deprecated, use value instead
map<string, Value> fields = 1;
Value value = 2;
Value metadata = 3 [deprecated = true];
Metadata metadata_full = 4;
}
message Trace {
map<string, Value> fields = 1;
Value metadata = 2 [deprecated = true];
Metadata metadata_full = 3;
}
message ValueMap {
map<string, Value> fields = 1;
}
message ValueArray {
repeated Value items = 1;
}
enum ValueNull {
NULL_VALUE = 0;
}
message Value {
reserved 3;
oneof kind {
bytes raw_bytes = 1;
google.protobuf.Timestamp timestamp = 2;
int64 integer = 4;
double float = 5;
bool boolean = 6;
ValueMap map = 7;
ValueArray array = 8;
ValueNull null = 9;
}
}
message DatadogOriginMetadata {
optional uint32 origin_product = 1;
optional uint32 origin_category = 2;
optional uint32 origin_service = 3;
}
message Secrets {
map<string, string> entries = 1;
}
message OutputId {
string component = 1;
optional string port = 2;
}
message Metadata {
Value value = 1;
DatadogOriginMetadata datadog_origin_metadata = 2;
optional string source_id = 3;
optional string source_type = 4;
OutputId upstream_id = 5;
Secrets secrets = 6;
}
message Metric {
string name = 1;
google.protobuf.Timestamp timestamp = 2;
map<string, string> tags_v1 = 3;
map<string, TagValues> tags_v2 = 20;
enum Kind {
Incremental = 0;
Absolute = 1;
}
Kind kind = 4;
oneof value {
Counter counter = 5;
Gauge gauge = 6;
Set set = 7;
Distribution1 distribution1 = 8;
AggregatedHistogram1 aggregated_histogram1 = 9;
AggregatedSummary1 aggregated_summary1 = 10;
Distribution2 distribution2 = 12;
AggregatedHistogram2 aggregated_histogram2 = 13;
AggregatedSummary2 aggregated_summary2 = 14;
Sketch sketch = 15;
AggregatedHistogram3 aggregated_histogram3 = 16;
AggregatedSummary3 aggregated_summary3 = 17;
}
string namespace = 11;
uint32 interval_ms = 18;
Value metadata = 19 [deprecated = true];
Metadata metadata_full = 21;
}
message TagValues {
repeated TagValue values = 1;
}
message TagValue {
optional string value = 1;
}
message Counter {
double value = 1;
}
message Gauge {
double value = 1;
}
message Set {
repeated string values = 1;
}
enum StatisticKind {
Histogram = 0;
Summary = 1;
}
message Distribution1 {
repeated double values = 1;
repeated uint32 sample_rates = 2;
StatisticKind statistic = 3;
}
message Distribution2 {
repeated DistributionSample samples = 1;
StatisticKind statistic = 2;
}
message DistributionSample {
double value = 1;
uint32 rate = 2;
}
message AggregatedHistogram1 {
repeated double buckets = 1;
repeated uint32 counts = 2;
uint32 count = 3;
double sum = 4;
}
message AggregatedHistogram2 {
repeated HistogramBucket buckets = 1;
uint32 count = 2;
double sum = 3;
}
message AggregatedHistogram3 {
repeated HistogramBucket3 buckets = 1;
uint64 count = 2;
double sum = 3;
}
message HistogramBucket {
double upper_limit = 1;
uint32 count = 2;
}
message HistogramBucket3 {
double upper_limit = 1;
uint64 count = 2;
}
message AggregatedSummary1 {
repeated double quantiles = 1;
repeated double values = 2;
uint32 count = 3;
double sum = 4;
}
message AggregatedSummary2 {
repeated SummaryQuantile quantiles = 1;
uint32 count = 2;
double sum = 3;
}
message AggregatedSummary3 {
repeated SummaryQuantile quantiles = 1;
uint64 count = 2;
double sum = 3;
}
message SummaryQuantile {
double quantile = 1;
double value = 2;
}
message Sketch {
message AgentDDSketch {
// Summary statistics for the samples in this sketch.
uint32 count = 1;
double min = 2;
double max = 3;
double sum = 4;
double avg = 5;
// The bins (buckets) of this sketch, where `k` and `n` are unzipped pairs.
// `k` is the list of bin indexes that are populated, and `n` is the count of samples
// within the given bin.
repeated sint32 k = 6;
repeated uint32 n = 7;
}
oneof sketch {
AgentDDSketch agent_dd_sketch = 1;
}
}