@kopai/core 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/dist/chunk-Bo1DHCg-.mjs +18 -0
- package/dist/index.cjs +1052 -0
- package/dist/index.d.cts +2888 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +2888 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +971 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +45 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,2888 @@
|
|
|
1
|
+
import z$1, { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/data-filters-zod.d.ts
|
|
4
|
+
declare namespace data_filters_zod_d_exports {
|
|
5
|
+
export { LogsDataFilter, MetricsDataFilter, TracesDataFilter, logsDataFilterSchema, metricsDataFilterSchema, tracesDataFilterSchema };
|
|
6
|
+
}
|
|
7
|
+
declare const tracesDataFilterSchema: z$1.ZodObject<{
|
|
8
|
+
traceId: z$1.ZodOptional<z$1.ZodString>;
|
|
9
|
+
spanId: z$1.ZodOptional<z$1.ZodString>;
|
|
10
|
+
parentSpanId: z$1.ZodOptional<z$1.ZodString>;
|
|
11
|
+
serviceName: z$1.ZodOptional<z$1.ZodString>;
|
|
12
|
+
spanName: z$1.ZodOptional<z$1.ZodString>;
|
|
13
|
+
spanKind: z$1.ZodOptional<z$1.ZodString>;
|
|
14
|
+
statusCode: z$1.ZodOptional<z$1.ZodString>;
|
|
15
|
+
scopeName: z$1.ZodOptional<z$1.ZodString>;
|
|
16
|
+
timestampMin: z$1.ZodOptional<z$1.ZodString>;
|
|
17
|
+
timestampMax: z$1.ZodOptional<z$1.ZodString>;
|
|
18
|
+
durationMin: z$1.ZodOptional<z$1.ZodString>;
|
|
19
|
+
durationMax: z$1.ZodOptional<z$1.ZodString>;
|
|
20
|
+
spanAttributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
21
|
+
resourceAttributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
22
|
+
eventsAttributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
23
|
+
linksAttributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
24
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
25
|
+
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
26
|
+
sortOrder: z$1.ZodOptional<z$1.ZodEnum<{
|
|
27
|
+
ASC: "ASC";
|
|
28
|
+
DESC: "DESC";
|
|
29
|
+
}>>;
|
|
30
|
+
}, z$1.z.core.$strip>;
|
|
31
|
+
type TracesDataFilter = z$1.infer<typeof tracesDataFilterSchema>;
|
|
32
|
+
declare const logsDataFilterSchema: z$1.ZodObject<{
|
|
33
|
+
traceId: z$1.ZodOptional<z$1.ZodString>;
|
|
34
|
+
spanId: z$1.ZodOptional<z$1.ZodString>;
|
|
35
|
+
serviceName: z$1.ZodOptional<z$1.ZodString>;
|
|
36
|
+
scopeName: z$1.ZodOptional<z$1.ZodString>;
|
|
37
|
+
severityText: z$1.ZodOptional<z$1.ZodString>;
|
|
38
|
+
severityNumberMin: z$1.ZodOptional<z$1.ZodNumber>;
|
|
39
|
+
severityNumberMax: z$1.ZodOptional<z$1.ZodNumber>;
|
|
40
|
+
bodyContains: z$1.ZodOptional<z$1.ZodString>;
|
|
41
|
+
timestampMin: z$1.ZodOptional<z$1.ZodString>;
|
|
42
|
+
timestampMax: z$1.ZodOptional<z$1.ZodString>;
|
|
43
|
+
logAttributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
44
|
+
resourceAttributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
45
|
+
scopeAttributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
46
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
47
|
+
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
48
|
+
sortOrder: z$1.ZodOptional<z$1.ZodEnum<{
|
|
49
|
+
ASC: "ASC";
|
|
50
|
+
DESC: "DESC";
|
|
51
|
+
}>>;
|
|
52
|
+
}, z$1.z.core.$strip>;
|
|
53
|
+
type LogsDataFilter = z$1.infer<typeof logsDataFilterSchema>;
|
|
54
|
+
declare const metricsDataFilterSchema: z$1.ZodObject<{
|
|
55
|
+
metricType: z$1.ZodEnum<{
|
|
56
|
+
Gauge: "Gauge";
|
|
57
|
+
Sum: "Sum";
|
|
58
|
+
Histogram: "Histogram";
|
|
59
|
+
ExponentialHistogram: "ExponentialHistogram";
|
|
60
|
+
Summary: "Summary";
|
|
61
|
+
}>;
|
|
62
|
+
metricName: z$1.ZodOptional<z$1.ZodString>;
|
|
63
|
+
serviceName: z$1.ZodOptional<z$1.ZodString>;
|
|
64
|
+
scopeName: z$1.ZodOptional<z$1.ZodString>;
|
|
65
|
+
timeUnixMin: z$1.ZodOptional<z$1.ZodString>;
|
|
66
|
+
timeUnixMax: z$1.ZodOptional<z$1.ZodString>;
|
|
67
|
+
attributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
68
|
+
resourceAttributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
69
|
+
scopeAttributes: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
70
|
+
limit: z$1.ZodOptional<z$1.ZodNumber>;
|
|
71
|
+
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
72
|
+
sortOrder: z$1.ZodOptional<z$1.ZodEnum<{
|
|
73
|
+
ASC: "ASC";
|
|
74
|
+
DESC: "DESC";
|
|
75
|
+
}>>;
|
|
76
|
+
}, z$1.z.core.$strip>;
|
|
77
|
+
type MetricsDataFilter = z$1.infer<typeof metricsDataFilterSchema>;
|
|
78
|
+
declare namespace denormalized_signals_zod_d_exports {
|
|
79
|
+
export { OtelExponentialHistogramRow, OtelGaugeRow, OtelHistogramRow, OtelLogsRow, OtelMetricsRow, OtelSumRow, OtelSummaryRow, OtelTracesRow, otelExponentialHistogramSchema, otelGaugeSchema, otelHistogramSchema, otelLogsSchema, otelMetricsSchema, otelSumSchema, otelSummarySchema, otelTracesSchema };
|
|
80
|
+
}
|
|
81
|
+
declare const otelTracesSchema: z.ZodObject<{
|
|
82
|
+
SpanId: z.ZodString;
|
|
83
|
+
Timestamp: z.ZodString;
|
|
84
|
+
TraceId: z.ZodString;
|
|
85
|
+
Duration: z.ZodOptional<z.ZodString>;
|
|
86
|
+
"Events.Attributes": z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
87
|
+
"Events.Name": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
88
|
+
"Events.Timestamp": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
89
|
+
"Links.Attributes": z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
90
|
+
"Links.SpanId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
91
|
+
"Links.TraceId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
|
+
"Links.TraceState": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
|
+
ParentSpanId: z.ZodOptional<z.ZodString>;
|
|
94
|
+
ResourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
95
|
+
ScopeName: z.ZodOptional<z.ZodString>;
|
|
96
|
+
ScopeVersion: z.ZodOptional<z.ZodString>;
|
|
97
|
+
ServiceName: z.ZodOptional<z.ZodString>;
|
|
98
|
+
SpanAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
99
|
+
SpanKind: z.ZodOptional<z.ZodString>;
|
|
100
|
+
SpanName: z.ZodOptional<z.ZodString>;
|
|
101
|
+
StatusCode: z.ZodOptional<z.ZodString>;
|
|
102
|
+
StatusMessage: z.ZodOptional<z.ZodString>;
|
|
103
|
+
TraceState: z.ZodOptional<z.ZodString>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
type OtelTracesRow = z.infer<typeof otelTracesSchema>;
|
|
106
|
+
declare const otelLogsSchema: z.ZodObject<{
|
|
107
|
+
Timestamp: z.ZodString;
|
|
108
|
+
Body: z.ZodOptional<z.ZodString>;
|
|
109
|
+
LogAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
110
|
+
ResourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
111
|
+
ResourceSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
112
|
+
ScopeAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
113
|
+
ScopeName: z.ZodOptional<z.ZodString>;
|
|
114
|
+
ScopeSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
115
|
+
ScopeVersion: z.ZodOptional<z.ZodString>;
|
|
116
|
+
ServiceName: z.ZodOptional<z.ZodString>;
|
|
117
|
+
SeverityNumber: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
SeverityText: z.ZodOptional<z.ZodString>;
|
|
119
|
+
SpanId: z.ZodOptional<z.ZodString>;
|
|
120
|
+
TraceFlags: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
TraceId: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
type OtelLogsRow = z.infer<typeof otelLogsSchema>;
|
|
124
|
+
declare const otelGaugeSchema: z.ZodObject<{
|
|
125
|
+
TimeUnix: z.ZodString;
|
|
126
|
+
StartTimeUnix: z.ZodString;
|
|
127
|
+
Attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
128
|
+
MetricName: z.ZodOptional<z.ZodString>;
|
|
129
|
+
MetricDescription: z.ZodOptional<z.ZodString>;
|
|
130
|
+
MetricUnit: z.ZodOptional<z.ZodString>;
|
|
131
|
+
ResourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
132
|
+
ResourceSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
133
|
+
ScopeAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
134
|
+
ScopeDroppedAttrCount: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
ScopeName: z.ZodOptional<z.ZodString>;
|
|
136
|
+
ScopeSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
137
|
+
ScopeVersion: z.ZodOptional<z.ZodString>;
|
|
138
|
+
ServiceName: z.ZodOptional<z.ZodString>;
|
|
139
|
+
"Exemplars.FilteredAttributes": z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
140
|
+
"Exemplars.SpanId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
141
|
+
"Exemplars.TimeUnix": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
142
|
+
"Exemplars.TraceId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
143
|
+
"Exemplars.Value": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
144
|
+
MetricType: z.ZodLiteral<"Gauge">;
|
|
145
|
+
Value: z.ZodNumber;
|
|
146
|
+
Flags: z.ZodOptional<z.ZodNumber>;
|
|
147
|
+
}, z.core.$strip>;
|
|
148
|
+
declare const otelSumSchema: z.ZodObject<{
|
|
149
|
+
TimeUnix: z.ZodString;
|
|
150
|
+
StartTimeUnix: z.ZodString;
|
|
151
|
+
Attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
152
|
+
MetricName: z.ZodOptional<z.ZodString>;
|
|
153
|
+
MetricDescription: z.ZodOptional<z.ZodString>;
|
|
154
|
+
MetricUnit: z.ZodOptional<z.ZodString>;
|
|
155
|
+
ResourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
156
|
+
ResourceSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
157
|
+
ScopeAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
158
|
+
ScopeDroppedAttrCount: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
ScopeName: z.ZodOptional<z.ZodString>;
|
|
160
|
+
ScopeSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
161
|
+
ScopeVersion: z.ZodOptional<z.ZodString>;
|
|
162
|
+
ServiceName: z.ZodOptional<z.ZodString>;
|
|
163
|
+
"Exemplars.FilteredAttributes": z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
164
|
+
"Exemplars.SpanId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
165
|
+
"Exemplars.TimeUnix": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
166
|
+
"Exemplars.TraceId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
167
|
+
"Exemplars.Value": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
168
|
+
MetricType: z.ZodLiteral<"Sum">;
|
|
169
|
+
Value: z.ZodNumber;
|
|
170
|
+
Flags: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
AggTemporality: z.ZodOptional<z.ZodString>;
|
|
172
|
+
IsMonotonic: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
declare const otelHistogramSchema: z.ZodObject<{
|
|
175
|
+
TimeUnix: z.ZodString;
|
|
176
|
+
StartTimeUnix: z.ZodString;
|
|
177
|
+
Attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
178
|
+
MetricName: z.ZodOptional<z.ZodString>;
|
|
179
|
+
MetricDescription: z.ZodOptional<z.ZodString>;
|
|
180
|
+
MetricUnit: z.ZodOptional<z.ZodString>;
|
|
181
|
+
ResourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
182
|
+
ResourceSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
183
|
+
ScopeAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
184
|
+
ScopeDroppedAttrCount: z.ZodOptional<z.ZodNumber>;
|
|
185
|
+
ScopeName: z.ZodOptional<z.ZodString>;
|
|
186
|
+
ScopeSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
187
|
+
ScopeVersion: z.ZodOptional<z.ZodString>;
|
|
188
|
+
ServiceName: z.ZodOptional<z.ZodString>;
|
|
189
|
+
"Exemplars.FilteredAttributes": z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
190
|
+
"Exemplars.SpanId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
191
|
+
"Exemplars.TimeUnix": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
192
|
+
"Exemplars.TraceId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
193
|
+
"Exemplars.Value": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
194
|
+
MetricType: z.ZodLiteral<"Histogram">;
|
|
195
|
+
Count: z.ZodOptional<z.ZodNumber>;
|
|
196
|
+
Sum: z.ZodOptional<z.ZodNumber>;
|
|
197
|
+
Min: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
198
|
+
Max: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
199
|
+
BucketCounts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
200
|
+
ExplicitBounds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
201
|
+
AggTemporality: z.ZodOptional<z.ZodString>;
|
|
202
|
+
}, z.core.$strip>;
|
|
203
|
+
declare const otelExponentialHistogramSchema: z.ZodObject<{
|
|
204
|
+
TimeUnix: z.ZodString;
|
|
205
|
+
StartTimeUnix: z.ZodString;
|
|
206
|
+
Attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
207
|
+
MetricName: z.ZodOptional<z.ZodString>;
|
|
208
|
+
MetricDescription: z.ZodOptional<z.ZodString>;
|
|
209
|
+
MetricUnit: z.ZodOptional<z.ZodString>;
|
|
210
|
+
ResourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
211
|
+
ResourceSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
212
|
+
ScopeAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
213
|
+
ScopeDroppedAttrCount: z.ZodOptional<z.ZodNumber>;
|
|
214
|
+
ScopeName: z.ZodOptional<z.ZodString>;
|
|
215
|
+
ScopeSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
216
|
+
ScopeVersion: z.ZodOptional<z.ZodString>;
|
|
217
|
+
ServiceName: z.ZodOptional<z.ZodString>;
|
|
218
|
+
"Exemplars.FilteredAttributes": z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
219
|
+
"Exemplars.SpanId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
220
|
+
"Exemplars.TimeUnix": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
221
|
+
"Exemplars.TraceId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
222
|
+
"Exemplars.Value": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
223
|
+
MetricType: z.ZodLiteral<"ExponentialHistogram">;
|
|
224
|
+
Count: z.ZodOptional<z.ZodNumber>;
|
|
225
|
+
Sum: z.ZodOptional<z.ZodNumber>;
|
|
226
|
+
Min: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
227
|
+
Max: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
228
|
+
Scale: z.ZodOptional<z.ZodNumber>;
|
|
229
|
+
ZeroCount: z.ZodOptional<z.ZodNumber>;
|
|
230
|
+
PositiveBucketCounts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
231
|
+
PositiveOffset: z.ZodOptional<z.ZodNumber>;
|
|
232
|
+
NegativeBucketCounts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
233
|
+
NegativeOffset: z.ZodOptional<z.ZodNumber>;
|
|
234
|
+
AggTemporality: z.ZodOptional<z.ZodString>;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
declare const otelSummarySchema: z.ZodObject<{
|
|
237
|
+
TimeUnix: z.ZodString;
|
|
238
|
+
StartTimeUnix: z.ZodString;
|
|
239
|
+
Attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
240
|
+
MetricName: z.ZodOptional<z.ZodString>;
|
|
241
|
+
MetricDescription: z.ZodOptional<z.ZodString>;
|
|
242
|
+
MetricUnit: z.ZodOptional<z.ZodString>;
|
|
243
|
+
ResourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
244
|
+
ResourceSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
245
|
+
ScopeAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
246
|
+
ScopeDroppedAttrCount: z.ZodOptional<z.ZodNumber>;
|
|
247
|
+
ScopeName: z.ZodOptional<z.ZodString>;
|
|
248
|
+
ScopeSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
249
|
+
ScopeVersion: z.ZodOptional<z.ZodString>;
|
|
250
|
+
ServiceName: z.ZodOptional<z.ZodString>;
|
|
251
|
+
"Exemplars.FilteredAttributes": z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
252
|
+
"Exemplars.SpanId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
253
|
+
"Exemplars.TimeUnix": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
254
|
+
"Exemplars.TraceId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
255
|
+
"Exemplars.Value": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
256
|
+
MetricType: z.ZodLiteral<"Summary">;
|
|
257
|
+
Count: z.ZodOptional<z.ZodNumber>;
|
|
258
|
+
Sum: z.ZodOptional<z.ZodNumber>;
|
|
259
|
+
"ValueAtQuantiles.Quantile": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
260
|
+
"ValueAtQuantiles.Value": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
261
|
+
}, z.core.$strip>;
|
|
262
|
+
declare const otelMetricsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
263
|
+
TimeUnix: z.ZodString;
|
|
264
|
+
StartTimeUnix: z.ZodString;
|
|
265
|
+
Attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
266
|
+
MetricName: z.ZodOptional<z.ZodString>;
|
|
267
|
+
MetricDescription: z.ZodOptional<z.ZodString>;
|
|
268
|
+
MetricUnit: z.ZodOptional<z.ZodString>;
|
|
269
|
+
ResourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
270
|
+
ResourceSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
271
|
+
ScopeAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
272
|
+
ScopeDroppedAttrCount: z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
ScopeName: z.ZodOptional<z.ZodString>;
|
|
274
|
+
ScopeSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
275
|
+
ScopeVersion: z.ZodOptional<z.ZodString>;
|
|
276
|
+
ServiceName: z.ZodOptional<z.ZodString>;
|
|
277
|
+
"Exemplars.FilteredAttributes": z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
278
|
+
"Exemplars.SpanId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
279
|
+
"Exemplars.TimeUnix": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
280
|
+
"Exemplars.TraceId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
281
|
+
"Exemplars.Value": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
282
|
+
MetricType: z.ZodLiteral<"Gauge">;
|
|
283
|
+
Value: z.ZodNumber;
|
|
284
|
+
Flags: z.ZodOptional<z.ZodNumber>;
|
|
285
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
286
|
+
TimeUnix: z.ZodString;
|
|
287
|
+
StartTimeUnix: z.ZodString;
|
|
288
|
+
Attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
289
|
+
MetricName: z.ZodOptional<z.ZodString>;
|
|
290
|
+
MetricDescription: z.ZodOptional<z.ZodString>;
|
|
291
|
+
MetricUnit: z.ZodOptional<z.ZodString>;
|
|
292
|
+
ResourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
293
|
+
ResourceSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
294
|
+
ScopeAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
295
|
+
ScopeDroppedAttrCount: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
ScopeName: z.ZodOptional<z.ZodString>;
|
|
297
|
+
ScopeSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
298
|
+
ScopeVersion: z.ZodOptional<z.ZodString>;
|
|
299
|
+
ServiceName: z.ZodOptional<z.ZodString>;
|
|
300
|
+
"Exemplars.FilteredAttributes": z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
301
|
+
"Exemplars.SpanId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
302
|
+
"Exemplars.TimeUnix": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
303
|
+
"Exemplars.TraceId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
304
|
+
"Exemplars.Value": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
305
|
+
MetricType: z.ZodLiteral<"Sum">;
|
|
306
|
+
Value: z.ZodNumber;
|
|
307
|
+
Flags: z.ZodOptional<z.ZodNumber>;
|
|
308
|
+
AggTemporality: z.ZodOptional<z.ZodString>;
|
|
309
|
+
IsMonotonic: z.ZodOptional<z.ZodNumber>;
|
|
310
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
311
|
+
TimeUnix: z.ZodString;
|
|
312
|
+
StartTimeUnix: z.ZodString;
|
|
313
|
+
Attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
314
|
+
MetricName: z.ZodOptional<z.ZodString>;
|
|
315
|
+
MetricDescription: z.ZodOptional<z.ZodString>;
|
|
316
|
+
MetricUnit: z.ZodOptional<z.ZodString>;
|
|
317
|
+
ResourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
318
|
+
ResourceSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
319
|
+
ScopeAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
320
|
+
ScopeDroppedAttrCount: z.ZodOptional<z.ZodNumber>;
|
|
321
|
+
ScopeName: z.ZodOptional<z.ZodString>;
|
|
322
|
+
ScopeSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
323
|
+
ScopeVersion: z.ZodOptional<z.ZodString>;
|
|
324
|
+
ServiceName: z.ZodOptional<z.ZodString>;
|
|
325
|
+
"Exemplars.FilteredAttributes": z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
326
|
+
"Exemplars.SpanId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
327
|
+
"Exemplars.TimeUnix": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
328
|
+
"Exemplars.TraceId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
329
|
+
"Exemplars.Value": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
330
|
+
MetricType: z.ZodLiteral<"Histogram">;
|
|
331
|
+
Count: z.ZodOptional<z.ZodNumber>;
|
|
332
|
+
Sum: z.ZodOptional<z.ZodNumber>;
|
|
333
|
+
Min: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
334
|
+
Max: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
335
|
+
BucketCounts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
336
|
+
ExplicitBounds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
337
|
+
AggTemporality: z.ZodOptional<z.ZodString>;
|
|
338
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
339
|
+
TimeUnix: z.ZodString;
|
|
340
|
+
StartTimeUnix: z.ZodString;
|
|
341
|
+
Attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
342
|
+
MetricName: z.ZodOptional<z.ZodString>;
|
|
343
|
+
MetricDescription: z.ZodOptional<z.ZodString>;
|
|
344
|
+
MetricUnit: z.ZodOptional<z.ZodString>;
|
|
345
|
+
ResourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
346
|
+
ResourceSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
347
|
+
ScopeAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
348
|
+
ScopeDroppedAttrCount: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
ScopeName: z.ZodOptional<z.ZodString>;
|
|
350
|
+
ScopeSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
351
|
+
ScopeVersion: z.ZodOptional<z.ZodString>;
|
|
352
|
+
ServiceName: z.ZodOptional<z.ZodString>;
|
|
353
|
+
"Exemplars.FilteredAttributes": z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
354
|
+
"Exemplars.SpanId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
355
|
+
"Exemplars.TimeUnix": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
356
|
+
"Exemplars.TraceId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
357
|
+
"Exemplars.Value": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
358
|
+
MetricType: z.ZodLiteral<"ExponentialHistogram">;
|
|
359
|
+
Count: z.ZodOptional<z.ZodNumber>;
|
|
360
|
+
Sum: z.ZodOptional<z.ZodNumber>;
|
|
361
|
+
Min: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
362
|
+
Max: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
363
|
+
Scale: z.ZodOptional<z.ZodNumber>;
|
|
364
|
+
ZeroCount: z.ZodOptional<z.ZodNumber>;
|
|
365
|
+
PositiveBucketCounts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
366
|
+
PositiveOffset: z.ZodOptional<z.ZodNumber>;
|
|
367
|
+
NegativeBucketCounts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
368
|
+
NegativeOffset: z.ZodOptional<z.ZodNumber>;
|
|
369
|
+
AggTemporality: z.ZodOptional<z.ZodString>;
|
|
370
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
371
|
+
TimeUnix: z.ZodString;
|
|
372
|
+
StartTimeUnix: z.ZodString;
|
|
373
|
+
Attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
374
|
+
MetricName: z.ZodOptional<z.ZodString>;
|
|
375
|
+
MetricDescription: z.ZodOptional<z.ZodString>;
|
|
376
|
+
MetricUnit: z.ZodOptional<z.ZodString>;
|
|
377
|
+
ResourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
378
|
+
ResourceSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
379
|
+
ScopeAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
380
|
+
ScopeDroppedAttrCount: z.ZodOptional<z.ZodNumber>;
|
|
381
|
+
ScopeName: z.ZodOptional<z.ZodString>;
|
|
382
|
+
ScopeSchemaUrl: z.ZodOptional<z.ZodString>;
|
|
383
|
+
ScopeVersion: z.ZodOptional<z.ZodString>;
|
|
384
|
+
ServiceName: z.ZodOptional<z.ZodString>;
|
|
385
|
+
"Exemplars.FilteredAttributes": z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>>;
|
|
386
|
+
"Exemplars.SpanId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
387
|
+
"Exemplars.TimeUnix": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
388
|
+
"Exemplars.TraceId": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
389
|
+
"Exemplars.Value": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
390
|
+
MetricType: z.ZodLiteral<"Summary">;
|
|
391
|
+
Count: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
Sum: z.ZodOptional<z.ZodNumber>;
|
|
393
|
+
"ValueAtQuantiles.Quantile": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
394
|
+
"ValueAtQuantiles.Value": z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
395
|
+
}, z.core.$strip>], "MetricType">;
|
|
396
|
+
type OtelGaugeRow = z.infer<typeof otelGaugeSchema>;
|
|
397
|
+
type OtelSumRow = z.infer<typeof otelSumSchema>;
|
|
398
|
+
type OtelHistogramRow = z.infer<typeof otelHistogramSchema>;
|
|
399
|
+
type OtelExponentialHistogramRow = z.infer<typeof otelExponentialHistogramSchema>;
|
|
400
|
+
type OtelSummaryRow = z.infer<typeof otelSummarySchema>;
|
|
401
|
+
type OtelMetricsRow = z.infer<typeof otelMetricsSchema>;
|
|
402
|
+
declare namespace otlp_generated_d_exports {
|
|
403
|
+
export { AggregationTemporality, AnyValue, ArrayValue, DataPointFlags, EntityRef, Exemplar$1 as Exemplar, ExponentialHistogram$1 as ExponentialHistogram, ExponentialHistogramDataPoint$1 as ExponentialHistogramDataPoint, ExponentialHistogramDataPoint_Buckets$1 as ExponentialHistogramDataPoint_Buckets, Gauge$1 as Gauge, Histogram$1 as Histogram, HistogramDataPoint$1 as HistogramDataPoint, InstrumentationScope, KeyValue, KeyValueList, LogRecord, LogRecordFlags, LogsData, Metric$1 as Metric, MetricsData$1 as MetricsData, NumberDataPoint$1 as NumberDataPoint, Resource, ResourceLogs, ResourceMetrics$1 as ResourceMetrics, ResourceSpans, ScopeLogs, ScopeMetrics$1 as ScopeMetrics, ScopeSpans, SeverityNumber, Span, SpanFlags, SpanKind, Span_Event, Span_Link, Status, StatusCode, Sum$1 as Sum, Summary$1 as Summary, SummaryDataPoint$1 as SummaryDataPoint, SummaryDataPoint_ValueAtQuantile$1 as SummaryDataPoint_ValueAtQuantile, TracesData };
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* OTLP TypeScript Types (JSON Encoding)
|
|
407
|
+
* Generated from OpenTelemetry Protocol v1.9.0
|
|
408
|
+
*
|
|
409
|
+
* Note: These types are for OTLP/JSON encoding, not protobuf binary.
|
|
410
|
+
* - Byte arrays (traceId, spanId) are hex-encoded strings
|
|
411
|
+
* - Enums are numeric values
|
|
412
|
+
*
|
|
413
|
+
* DO NOT EDIT MANUALLY - Generated by scripts/generate-otlp-types.ts
|
|
414
|
+
* Regenerate with: npm run generate:types
|
|
415
|
+
*/
|
|
416
|
+
/**
|
|
417
|
+
* Represents any type of attribute value. AnyValue may contain a
|
|
418
|
+
* primitive value such as a string or integer or it may contain an arbitrary nested
|
|
419
|
+
* object containing arrays, key-value lists and primitives.
|
|
420
|
+
*/
|
|
421
|
+
interface AnyValue {
|
|
422
|
+
stringValue?: string | undefined;
|
|
423
|
+
boolValue?: boolean | undefined;
|
|
424
|
+
intValue?: string | number | undefined;
|
|
425
|
+
doubleValue?: number | undefined;
|
|
426
|
+
arrayValue?: ArrayValue | undefined;
|
|
427
|
+
kvlistValue?: KeyValueList | undefined;
|
|
428
|
+
bytesValue?: string | undefined;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* ArrayValue is a list of AnyValue messages. We need ArrayValue as a message
|
|
432
|
+
* since oneof in AnyValue does not allow repeated fields.
|
|
433
|
+
*/
|
|
434
|
+
interface ArrayValue {
|
|
435
|
+
/** Array of values. The array may be empty (contain 0 elements). */
|
|
436
|
+
values?: AnyValue[] | undefined;
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* KeyValueList is a list of KeyValue messages. We need KeyValueList as a message
|
|
440
|
+
* since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need
|
|
441
|
+
* a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to
|
|
442
|
+
* avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches
|
|
443
|
+
* are semantically equivalent.
|
|
444
|
+
*/
|
|
445
|
+
interface KeyValueList {
|
|
446
|
+
/**
|
|
447
|
+
* A collection of key/value pairs of key-value pairs. The list may be empty (may
|
|
448
|
+
* contain 0 elements).
|
|
449
|
+
*
|
|
450
|
+
* The keys MUST be unique (it is not allowed to have more than one
|
|
451
|
+
* value with the same key).
|
|
452
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
453
|
+
*/
|
|
454
|
+
values?: KeyValue[] | undefined;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Represents a key-value pair that is used to store Span attributes, Link
|
|
458
|
+
* attributes, etc.
|
|
459
|
+
*/
|
|
460
|
+
interface KeyValue {
|
|
461
|
+
/** The key name of the pair. */
|
|
462
|
+
key?: string | undefined;
|
|
463
|
+
/** The value of the pair. */
|
|
464
|
+
value?: AnyValue | undefined;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* InstrumentationScope is a message representing the instrumentation scope information
|
|
468
|
+
* such as the fully qualified name and version.
|
|
469
|
+
*/
|
|
470
|
+
interface InstrumentationScope {
|
|
471
|
+
/**
|
|
472
|
+
* A name denoting the Instrumentation scope.
|
|
473
|
+
* An empty instrumentation scope name means the name is unknown.
|
|
474
|
+
*/
|
|
475
|
+
name?: string | undefined;
|
|
476
|
+
/**
|
|
477
|
+
* Defines the version of the instrumentation scope.
|
|
478
|
+
* An empty instrumentation scope version means the version is unknown.
|
|
479
|
+
*/
|
|
480
|
+
version?: string | undefined;
|
|
481
|
+
/**
|
|
482
|
+
* Additional attributes that describe the scope. [Optional].
|
|
483
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
484
|
+
* attribute with the same key).
|
|
485
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
486
|
+
*/
|
|
487
|
+
attributes?: KeyValue[] | undefined;
|
|
488
|
+
/**
|
|
489
|
+
* The number of attributes that were discarded. Attributes
|
|
490
|
+
* can be discarded because their keys are too long or because there are too many
|
|
491
|
+
* attributes. If this value is 0, then no attributes were dropped.
|
|
492
|
+
*/
|
|
493
|
+
droppedAttributesCount?: number | undefined;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* A reference to an Entity.
|
|
497
|
+
* Entity represents an object of interest associated with produced telemetry: e.g spans, metrics, profiles, or logs.
|
|
498
|
+
*
|
|
499
|
+
* Status: [Development]
|
|
500
|
+
*/
|
|
501
|
+
interface EntityRef {
|
|
502
|
+
/**
|
|
503
|
+
* The Schema URL, if known. This is the identifier of the Schema that the entity data
|
|
504
|
+
* is recorded in. To learn more about Schema URL see
|
|
505
|
+
* https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
|
|
506
|
+
*
|
|
507
|
+
* This schema_url applies to the data in this message and to the Resource attributes
|
|
508
|
+
* referenced by id_keys and description_keys.
|
|
509
|
+
* TODO: discuss if we are happy with this somewhat complicated definition of what
|
|
510
|
+
* the schema_url applies to.
|
|
511
|
+
*
|
|
512
|
+
* This field obsoletes the schema_url field in ResourceMetrics/ResourceSpans/ResourceLogs.
|
|
513
|
+
*/
|
|
514
|
+
schemaUrl?: string | undefined;
|
|
515
|
+
/**
|
|
516
|
+
* Defines the type of the entity. MUST not change during the lifetime of the entity.
|
|
517
|
+
* For example: "service" or "host". This field is required and MUST not be empty
|
|
518
|
+
* for valid entities.
|
|
519
|
+
*/
|
|
520
|
+
type?: string | undefined;
|
|
521
|
+
/**
|
|
522
|
+
* Attribute Keys that identify the entity.
|
|
523
|
+
* MUST not change during the lifetime of the entity. The Id must contain at least one attribute.
|
|
524
|
+
* These keys MUST exist in the containing {message}.attributes.
|
|
525
|
+
*/
|
|
526
|
+
idKeys?: string[] | undefined;
|
|
527
|
+
/**
|
|
528
|
+
* Descriptive (non-identifying) attribute keys of the entity.
|
|
529
|
+
* MAY change over the lifetime of the entity. MAY be empty.
|
|
530
|
+
* These attribute keys are not part of entity's identity.
|
|
531
|
+
* These keys MUST exist in the containing {message}.attributes.
|
|
532
|
+
*/
|
|
533
|
+
descriptionKeys?: string[] | undefined;
|
|
534
|
+
}
|
|
535
|
+
/** Resource information. */
|
|
536
|
+
interface Resource {
|
|
537
|
+
/**
|
|
538
|
+
* Set of attributes that describe the resource.
|
|
539
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
540
|
+
* attribute with the same key).
|
|
541
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
542
|
+
*/
|
|
543
|
+
attributes?: KeyValue[] | undefined;
|
|
544
|
+
/**
|
|
545
|
+
* The number of dropped attributes. If the value is 0, then
|
|
546
|
+
* no attributes were dropped.
|
|
547
|
+
*/
|
|
548
|
+
droppedAttributesCount?: number | undefined;
|
|
549
|
+
/**
|
|
550
|
+
* Set of entities that participate in this Resource.
|
|
551
|
+
*
|
|
552
|
+
* Note: keys in the references MUST exist in attributes of this message.
|
|
553
|
+
*
|
|
554
|
+
* Status: [Development]
|
|
555
|
+
*/
|
|
556
|
+
entityRefs?: EntityRef[] | undefined;
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* SpanFlags represents constants used to interpret the
|
|
560
|
+
* Span.flags field, which is protobuf 'fixed32' type and is to
|
|
561
|
+
* be used as bit-fields. Each non-zero value defined in this enum is
|
|
562
|
+
* a bit-mask. To extract the bit-field, for example, use an
|
|
563
|
+
* expression like:
|
|
564
|
+
*
|
|
565
|
+
* (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK)
|
|
566
|
+
*
|
|
567
|
+
* See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.
|
|
568
|
+
*
|
|
569
|
+
* Note that Span flags were introduced in version 1.1 of the
|
|
570
|
+
* OpenTelemetry protocol. Older Span producers do not set this
|
|
571
|
+
* field, consequently consumers should not rely on the absence of a
|
|
572
|
+
* particular flag bit to indicate the presence of a particular feature.
|
|
573
|
+
*/
|
|
574
|
+
declare enum SpanFlags {
|
|
575
|
+
/**
|
|
576
|
+
* SPAN_FLAGS_DO_NOT_USE - The zero value for the enum. Should not be used for comparisons.
|
|
577
|
+
* Instead use bitwise "and" with the appropriate mask as shown above.
|
|
578
|
+
*/
|
|
579
|
+
SPAN_FLAGS_DO_NOT_USE = 0,
|
|
580
|
+
/** SPAN_FLAGS_TRACE_FLAGS_MASK - Bits 0-7 are used for trace flags. */
|
|
581
|
+
SPAN_FLAGS_TRACE_FLAGS_MASK = 255,
|
|
582
|
+
/**
|
|
583
|
+
* SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK - Bits 8 and 9 are used to indicate that the parent span or link span is remote.
|
|
584
|
+
* Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known.
|
|
585
|
+
* Bit 9 (`IS_REMOTE`) indicates whether the span or link is remote.
|
|
586
|
+
*/
|
|
587
|
+
SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK = 256,
|
|
588
|
+
SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK = 512,
|
|
589
|
+
UNRECOGNIZED = -1
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* TracesData represents the traces data that can be stored in a persistent storage,
|
|
593
|
+
* OR can be embedded by other protocols that transfer OTLP traces data but do
|
|
594
|
+
* not implement the OTLP protocol.
|
|
595
|
+
*
|
|
596
|
+
* The main difference between this message and collector protocol is that
|
|
597
|
+
* in this message there will not be any "control" or "metadata" specific to
|
|
598
|
+
* OTLP protocol.
|
|
599
|
+
*
|
|
600
|
+
* When new fields are added into this message, the OTLP request MUST be updated
|
|
601
|
+
* as well.
|
|
602
|
+
*/
|
|
603
|
+
interface TracesData {
|
|
604
|
+
/**
|
|
605
|
+
* An array of ResourceSpans.
|
|
606
|
+
* For data coming from a single resource this array will typically contain
|
|
607
|
+
* one element. Intermediary nodes that receive data from multiple origins
|
|
608
|
+
* typically batch the data before forwarding further and in that case this
|
|
609
|
+
* array will contain multiple elements.
|
|
610
|
+
*/
|
|
611
|
+
resourceSpans?: ResourceSpans[] | undefined;
|
|
612
|
+
}
|
|
613
|
+
/** A collection of ScopeSpans from a Resource. */
|
|
614
|
+
interface ResourceSpans {
|
|
615
|
+
/**
|
|
616
|
+
* The resource for the spans in this message.
|
|
617
|
+
* If this field is not set then no resource info is known.
|
|
618
|
+
*/
|
|
619
|
+
resource?: Resource | undefined;
|
|
620
|
+
/** A list of ScopeSpans that originate from a resource. */
|
|
621
|
+
scopeSpans?: ScopeSpans[] | undefined;
|
|
622
|
+
/**
|
|
623
|
+
* The Schema URL, if known. This is the identifier of the Schema that the resource data
|
|
624
|
+
* is recorded in. Notably, the last part of the URL path is the version number of the
|
|
625
|
+
* schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
|
|
626
|
+
* https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
|
|
627
|
+
* This schema_url applies to the data in the "resource" field. It does not apply
|
|
628
|
+
* to the data in the "scope_spans" field which have their own schema_url field.
|
|
629
|
+
*/
|
|
630
|
+
schemaUrl?: string | undefined;
|
|
631
|
+
}
|
|
632
|
+
/** A collection of Spans produced by an InstrumentationScope. */
|
|
633
|
+
interface ScopeSpans {
|
|
634
|
+
/**
|
|
635
|
+
* The instrumentation scope information for the spans in this message.
|
|
636
|
+
* Semantically when InstrumentationScope isn't set, it is equivalent with
|
|
637
|
+
* an empty instrumentation scope name (unknown).
|
|
638
|
+
*/
|
|
639
|
+
scope?: InstrumentationScope | undefined;
|
|
640
|
+
/** A list of Spans that originate from an instrumentation scope. */
|
|
641
|
+
spans?: Span[] | undefined;
|
|
642
|
+
/**
|
|
643
|
+
* The Schema URL, if known. This is the identifier of the Schema that the span data
|
|
644
|
+
* is recorded in. Notably, the last part of the URL path is the version number of the
|
|
645
|
+
* schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
|
|
646
|
+
* https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
|
|
647
|
+
* This schema_url applies to the data in the "scope" field and all spans and span
|
|
648
|
+
* events in the "spans" field.
|
|
649
|
+
*/
|
|
650
|
+
schemaUrl?: string | undefined;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* A Span represents a single operation performed by a single component of the system.
|
|
654
|
+
*
|
|
655
|
+
* The next available field id is 17.
|
|
656
|
+
*/
|
|
657
|
+
interface Span {
|
|
658
|
+
/**
|
|
659
|
+
* A unique identifier for a trace. All spans from the same trace share
|
|
660
|
+
* the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
|
|
661
|
+
* of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
|
|
662
|
+
* is zero-length and thus is also invalid).
|
|
663
|
+
*
|
|
664
|
+
* This field is required.
|
|
665
|
+
*/
|
|
666
|
+
traceId?: string | undefined;
|
|
667
|
+
/**
|
|
668
|
+
* A unique identifier for a span within a trace, assigned when the span
|
|
669
|
+
* is created. The ID is an 8-byte array. An ID with all zeroes OR of length
|
|
670
|
+
* other than 8 bytes is considered invalid (empty string in OTLP/JSON
|
|
671
|
+
* is zero-length and thus is also invalid).
|
|
672
|
+
*
|
|
673
|
+
* This field is required.
|
|
674
|
+
*/
|
|
675
|
+
spanId?: string | undefined;
|
|
676
|
+
/**
|
|
677
|
+
* trace_state conveys information about request position in multiple distributed tracing graphs.
|
|
678
|
+
* It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header
|
|
679
|
+
* See also https://github.com/w3c/distributed-tracing for more details about this field.
|
|
680
|
+
*/
|
|
681
|
+
traceState?: string | undefined;
|
|
682
|
+
/**
|
|
683
|
+
* The `span_id` of this span's parent span. If this is a root span, then this
|
|
684
|
+
* field must be empty. The ID is an 8-byte array.
|
|
685
|
+
*/
|
|
686
|
+
parentSpanId?: string | undefined;
|
|
687
|
+
/**
|
|
688
|
+
* Flags, a bit field.
|
|
689
|
+
*
|
|
690
|
+
* Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace
|
|
691
|
+
* Context specification. To read the 8-bit W3C trace flag, use
|
|
692
|
+
* `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.
|
|
693
|
+
*
|
|
694
|
+
* See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.
|
|
695
|
+
*
|
|
696
|
+
* Bits 8 and 9 represent the 3 states of whether a span's parent
|
|
697
|
+
* is remote. The states are (unknown, is not remote, is remote).
|
|
698
|
+
* To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.
|
|
699
|
+
* To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.
|
|
700
|
+
*
|
|
701
|
+
* When creating span messages, if the message is logically forwarded from another source
|
|
702
|
+
* with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD
|
|
703
|
+
* be copied as-is. If creating from a source that does not have an equivalent flags field
|
|
704
|
+
* (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST
|
|
705
|
+
* be set to zero.
|
|
706
|
+
* Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.
|
|
707
|
+
*
|
|
708
|
+
* [Optional].
|
|
709
|
+
*/
|
|
710
|
+
flags?: number | undefined;
|
|
711
|
+
/**
|
|
712
|
+
* A description of the span's operation.
|
|
713
|
+
*
|
|
714
|
+
* For example, the name can be a qualified method name or a file name
|
|
715
|
+
* and a line number where the operation is called. A best practice is to use
|
|
716
|
+
* the same display name at the same call point in an application.
|
|
717
|
+
* This makes it easier to correlate spans in different traces.
|
|
718
|
+
*
|
|
719
|
+
* This field is semantically required to be set to non-empty string.
|
|
720
|
+
* Empty value is equivalent to an unknown span name.
|
|
721
|
+
*
|
|
722
|
+
* This field is required.
|
|
723
|
+
*/
|
|
724
|
+
name?: string | undefined;
|
|
725
|
+
/**
|
|
726
|
+
* Distinguishes between spans generated in a particular context. For example,
|
|
727
|
+
* two spans with the same name may be distinguished using `CLIENT` (caller)
|
|
728
|
+
* and `SERVER` (callee) to identify queueing latency associated with the span.
|
|
729
|
+
*/
|
|
730
|
+
kind?: SpanKind | undefined;
|
|
731
|
+
/**
|
|
732
|
+
* The start time of the span. On the client side, this is the time
|
|
733
|
+
* kept by the local machine where the span execution starts. On the server side, this
|
|
734
|
+
* is the time when the server's application handler starts running.
|
|
735
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
|
|
736
|
+
*
|
|
737
|
+
* This field is semantically required and it is expected that end_time >= start_time.
|
|
738
|
+
*/
|
|
739
|
+
startTimeUnixNano?: string | undefined;
|
|
740
|
+
/**
|
|
741
|
+
* The end time of the span. On the client side, this is the time
|
|
742
|
+
* kept by the local machine where the span execution ends. On the server side, this
|
|
743
|
+
* is the time when the server application handler stops running.
|
|
744
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
|
|
745
|
+
*
|
|
746
|
+
* This field is semantically required and it is expected that end_time >= start_time.
|
|
747
|
+
*/
|
|
748
|
+
endTimeUnixNano?: string | undefined;
|
|
749
|
+
/**
|
|
750
|
+
* A collection of key/value pairs. Note, global attributes
|
|
751
|
+
* like server name can be set using the resource API. Examples of attributes:
|
|
752
|
+
*
|
|
753
|
+
* "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
|
|
754
|
+
* "/http/server_latency": 300
|
|
755
|
+
* "example.com/myattribute": true
|
|
756
|
+
* "example.com/score": 10.239
|
|
757
|
+
*
|
|
758
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
759
|
+
* attribute with the same key).
|
|
760
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
761
|
+
*/
|
|
762
|
+
attributes?: KeyValue[] | undefined;
|
|
763
|
+
/**
|
|
764
|
+
* The number of attributes that were discarded. Attributes
|
|
765
|
+
* can be discarded because their keys are too long or because there are too many
|
|
766
|
+
* attributes. If this value is 0, then no attributes were dropped.
|
|
767
|
+
*/
|
|
768
|
+
droppedAttributesCount?: number | undefined;
|
|
769
|
+
/** A collection of Event items. */
|
|
770
|
+
events?: Span_Event[] | undefined;
|
|
771
|
+
/**
|
|
772
|
+
* The number of dropped events. If the value is 0, then no
|
|
773
|
+
* events were dropped.
|
|
774
|
+
*/
|
|
775
|
+
droppedEventsCount?: number | undefined;
|
|
776
|
+
/**
|
|
777
|
+
* A collection of Links, which are references from this span to a span
|
|
778
|
+
* in the same or different trace.
|
|
779
|
+
*/
|
|
780
|
+
links?: Span_Link[] | undefined;
|
|
781
|
+
/**
|
|
782
|
+
* The number of dropped links after the maximum size was
|
|
783
|
+
* enforced. If this value is 0, then no links were dropped.
|
|
784
|
+
*/
|
|
785
|
+
droppedLinksCount?: number | undefined;
|
|
786
|
+
/**
|
|
787
|
+
* An optional final status for this span. Semantically when Status isn't set, it means
|
|
788
|
+
* span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0).
|
|
789
|
+
*/
|
|
790
|
+
status?: Status | undefined;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* SpanKind is the type of span. Can be used to specify additional relationships between spans
|
|
794
|
+
* in addition to a parent/child relationship.
|
|
795
|
+
*/
|
|
796
|
+
declare enum SpanKind {
|
|
797
|
+
/**
|
|
798
|
+
* SPAN_KIND_UNSPECIFIED - Unspecified. Do NOT use as default.
|
|
799
|
+
* Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED.
|
|
800
|
+
*/
|
|
801
|
+
SPAN_KIND_UNSPECIFIED = 0,
|
|
802
|
+
/**
|
|
803
|
+
* SPAN_KIND_INTERNAL - Indicates that the span represents an internal operation within an application,
|
|
804
|
+
* as opposed to an operation happening at the boundaries. Default value.
|
|
805
|
+
*/
|
|
806
|
+
SPAN_KIND_INTERNAL = 1,
|
|
807
|
+
/**
|
|
808
|
+
* SPAN_KIND_SERVER - Indicates that the span covers server-side handling of an RPC or other
|
|
809
|
+
* remote network request.
|
|
810
|
+
*/
|
|
811
|
+
SPAN_KIND_SERVER = 2,
|
|
812
|
+
/** SPAN_KIND_CLIENT - Indicates that the span describes a request to some remote service. */
|
|
813
|
+
SPAN_KIND_CLIENT = 3,
|
|
814
|
+
/**
|
|
815
|
+
* SPAN_KIND_PRODUCER - Indicates that the span describes a producer sending a message to a broker.
|
|
816
|
+
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship
|
|
817
|
+
* between producer and consumer spans. A PRODUCER span ends when the message was accepted
|
|
818
|
+
* by the broker while the logical processing of the message might span a much longer time.
|
|
819
|
+
*/
|
|
820
|
+
SPAN_KIND_PRODUCER = 4,
|
|
821
|
+
/**
|
|
822
|
+
* SPAN_KIND_CONSUMER - Indicates that the span describes consumer receiving a message from a broker.
|
|
823
|
+
* Like the PRODUCER kind, there is often no direct critical path latency relationship
|
|
824
|
+
* between producer and consumer spans.
|
|
825
|
+
*/
|
|
826
|
+
SPAN_KIND_CONSUMER = 5,
|
|
827
|
+
UNRECOGNIZED = -1
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* Event is a time-stamped annotation of the span, consisting of user-supplied
|
|
831
|
+
* text description and key-value pairs.
|
|
832
|
+
*/
|
|
833
|
+
interface Span_Event {
|
|
834
|
+
/** The time the event occurred. */
|
|
835
|
+
timeUnixNano?: string | undefined;
|
|
836
|
+
/**
|
|
837
|
+
* The name of the event.
|
|
838
|
+
* This field is semantically required to be set to non-empty string.
|
|
839
|
+
*/
|
|
840
|
+
name?: string | undefined;
|
|
841
|
+
/**
|
|
842
|
+
* A collection of attribute key/value pairs on the event.
|
|
843
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
844
|
+
* attribute with the same key).
|
|
845
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
846
|
+
*/
|
|
847
|
+
attributes?: KeyValue[] | undefined;
|
|
848
|
+
/**
|
|
849
|
+
* The number of dropped attributes. If the value is 0,
|
|
850
|
+
* then no attributes were dropped.
|
|
851
|
+
*/
|
|
852
|
+
droppedAttributesCount?: number | undefined;
|
|
853
|
+
}
|
|
854
|
+
/**
|
|
855
|
+
* A pointer from the current span to another span in the same trace or in a
|
|
856
|
+
* different trace. For example, this can be used in batching operations,
|
|
857
|
+
* where a single batch handler processes multiple requests from different
|
|
858
|
+
* traces or when the handler receives a request from a different project.
|
|
859
|
+
*/
|
|
860
|
+
interface Span_Link {
|
|
861
|
+
/**
|
|
862
|
+
* A unique identifier of a trace that this linked span is part of. The ID is a
|
|
863
|
+
* 16-byte array.
|
|
864
|
+
*/
|
|
865
|
+
traceId?: string | undefined;
|
|
866
|
+
/** A unique identifier for the linked span. The ID is an 8-byte array. */
|
|
867
|
+
spanId?: string | undefined;
|
|
868
|
+
/** The trace_state associated with the link. */
|
|
869
|
+
traceState?: string | undefined;
|
|
870
|
+
/**
|
|
871
|
+
* A collection of attribute key/value pairs on the link.
|
|
872
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
873
|
+
* attribute with the same key).
|
|
874
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
875
|
+
*/
|
|
876
|
+
attributes?: KeyValue[] | undefined;
|
|
877
|
+
/**
|
|
878
|
+
* The number of dropped attributes. If the value is 0,
|
|
879
|
+
* then no attributes were dropped.
|
|
880
|
+
*/
|
|
881
|
+
droppedAttributesCount?: number | undefined;
|
|
882
|
+
/**
|
|
883
|
+
* Flags, a bit field.
|
|
884
|
+
*
|
|
885
|
+
* Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace
|
|
886
|
+
* Context specification. To read the 8-bit W3C trace flag, use
|
|
887
|
+
* `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`.
|
|
888
|
+
*
|
|
889
|
+
* See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions.
|
|
890
|
+
*
|
|
891
|
+
* Bits 8 and 9 represent the 3 states of whether the link is remote.
|
|
892
|
+
* The states are (unknown, is not remote, is remote).
|
|
893
|
+
* To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`.
|
|
894
|
+
* To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`.
|
|
895
|
+
*
|
|
896
|
+
* Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero.
|
|
897
|
+
* When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero.
|
|
898
|
+
*
|
|
899
|
+
* [Optional].
|
|
900
|
+
*/
|
|
901
|
+
flags?: number | undefined;
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* The Status type defines a logical error model that is suitable for different
|
|
905
|
+
* programming environments, including REST APIs and RPC APIs.
|
|
906
|
+
*/
|
|
907
|
+
interface Status {
|
|
908
|
+
/** A developer-facing human readable error message. */
|
|
909
|
+
message?: string | undefined;
|
|
910
|
+
/** The status code. */
|
|
911
|
+
code?: StatusCode | undefined;
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* For the semantics of status codes see
|
|
915
|
+
* https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status
|
|
916
|
+
*/
|
|
917
|
+
declare enum StatusCode {
|
|
918
|
+
/** STATUS_CODE_UNSET - The default status. */
|
|
919
|
+
STATUS_CODE_UNSET = 0,
|
|
920
|
+
/**
|
|
921
|
+
* STATUS_CODE_OK - The Span has been validated by an Application developer or Operator to
|
|
922
|
+
* have completed successfully.
|
|
923
|
+
*/
|
|
924
|
+
STATUS_CODE_OK = 1,
|
|
925
|
+
/** STATUS_CODE_ERROR - The Span contains an error. */
|
|
926
|
+
STATUS_CODE_ERROR = 2,
|
|
927
|
+
UNRECOGNIZED = -1
|
|
928
|
+
}
|
|
929
|
+
/** Possible values for LogRecord.SeverityNumber. */
|
|
930
|
+
declare enum SeverityNumber {
|
|
931
|
+
/** SEVERITY_NUMBER_UNSPECIFIED - UNSPECIFIED is the default SeverityNumber, it MUST NOT be used. */
|
|
932
|
+
SEVERITY_NUMBER_UNSPECIFIED = 0,
|
|
933
|
+
SEVERITY_NUMBER_TRACE = 1,
|
|
934
|
+
SEVERITY_NUMBER_TRACE2 = 2,
|
|
935
|
+
SEVERITY_NUMBER_TRACE3 = 3,
|
|
936
|
+
SEVERITY_NUMBER_TRACE4 = 4,
|
|
937
|
+
SEVERITY_NUMBER_DEBUG = 5,
|
|
938
|
+
SEVERITY_NUMBER_DEBUG2 = 6,
|
|
939
|
+
SEVERITY_NUMBER_DEBUG3 = 7,
|
|
940
|
+
SEVERITY_NUMBER_DEBUG4 = 8,
|
|
941
|
+
SEVERITY_NUMBER_INFO = 9,
|
|
942
|
+
SEVERITY_NUMBER_INFO2 = 10,
|
|
943
|
+
SEVERITY_NUMBER_INFO3 = 11,
|
|
944
|
+
SEVERITY_NUMBER_INFO4 = 12,
|
|
945
|
+
SEVERITY_NUMBER_WARN = 13,
|
|
946
|
+
SEVERITY_NUMBER_WARN2 = 14,
|
|
947
|
+
SEVERITY_NUMBER_WARN3 = 15,
|
|
948
|
+
SEVERITY_NUMBER_WARN4 = 16,
|
|
949
|
+
SEVERITY_NUMBER_ERROR = 17,
|
|
950
|
+
SEVERITY_NUMBER_ERROR2 = 18,
|
|
951
|
+
SEVERITY_NUMBER_ERROR3 = 19,
|
|
952
|
+
SEVERITY_NUMBER_ERROR4 = 20,
|
|
953
|
+
SEVERITY_NUMBER_FATAL = 21,
|
|
954
|
+
SEVERITY_NUMBER_FATAL2 = 22,
|
|
955
|
+
SEVERITY_NUMBER_FATAL3 = 23,
|
|
956
|
+
SEVERITY_NUMBER_FATAL4 = 24,
|
|
957
|
+
UNRECOGNIZED = -1
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* LogRecordFlags represents constants used to interpret the
|
|
961
|
+
* LogRecord.flags field, which is protobuf 'fixed32' type and is to
|
|
962
|
+
* be used as bit-fields. Each non-zero value defined in this enum is
|
|
963
|
+
* a bit-mask. To extract the bit-field, for example, use an
|
|
964
|
+
* expression like:
|
|
965
|
+
*
|
|
966
|
+
* (logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK)
|
|
967
|
+
*/
|
|
968
|
+
declare enum LogRecordFlags {
|
|
969
|
+
/**
|
|
970
|
+
* LOG_RECORD_FLAGS_DO_NOT_USE - The zero value for the enum. Should not be used for comparisons.
|
|
971
|
+
* Instead use bitwise "and" with the appropriate mask as shown above.
|
|
972
|
+
*/
|
|
973
|
+
LOG_RECORD_FLAGS_DO_NOT_USE = 0,
|
|
974
|
+
/** LOG_RECORD_FLAGS_TRACE_FLAGS_MASK - Bits 0-7 are used for trace flags. */
|
|
975
|
+
LOG_RECORD_FLAGS_TRACE_FLAGS_MASK = 255,
|
|
976
|
+
UNRECOGNIZED = -1
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* LogsData represents the logs data that can be stored in a persistent storage,
|
|
980
|
+
* OR can be embedded by other protocols that transfer OTLP logs data but do not
|
|
981
|
+
* implement the OTLP protocol.
|
|
982
|
+
*
|
|
983
|
+
* The main difference between this message and collector protocol is that
|
|
984
|
+
* in this message there will not be any "control" or "metadata" specific to
|
|
985
|
+
* OTLP protocol.
|
|
986
|
+
*
|
|
987
|
+
* When new fields are added into this message, the OTLP request MUST be updated
|
|
988
|
+
* as well.
|
|
989
|
+
*/
|
|
990
|
+
interface LogsData {
|
|
991
|
+
/**
|
|
992
|
+
* An array of ResourceLogs.
|
|
993
|
+
* For data coming from a single resource this array will typically contain
|
|
994
|
+
* one element. Intermediary nodes that receive data from multiple origins
|
|
995
|
+
* typically batch the data before forwarding further and in that case this
|
|
996
|
+
* array will contain multiple elements.
|
|
997
|
+
*/
|
|
998
|
+
resourceLogs?: ResourceLogs[] | undefined;
|
|
999
|
+
}
|
|
1000
|
+
/** A collection of ScopeLogs from a Resource. */
|
|
1001
|
+
interface ResourceLogs {
|
|
1002
|
+
/**
|
|
1003
|
+
* The resource for the logs in this message.
|
|
1004
|
+
* If this field is not set then resource info is unknown.
|
|
1005
|
+
*/
|
|
1006
|
+
resource?: Resource | undefined;
|
|
1007
|
+
/** A list of ScopeLogs that originate from a resource. */
|
|
1008
|
+
scopeLogs?: ScopeLogs[] | undefined;
|
|
1009
|
+
/**
|
|
1010
|
+
* The Schema URL, if known. This is the identifier of the Schema that the resource data
|
|
1011
|
+
* is recorded in. Notably, the last part of the URL path is the version number of the
|
|
1012
|
+
* schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
|
|
1013
|
+
* https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
|
|
1014
|
+
* This schema_url applies to the data in the "resource" field. It does not apply
|
|
1015
|
+
* to the data in the "scope_logs" field which have their own schema_url field.
|
|
1016
|
+
*/
|
|
1017
|
+
schemaUrl?: string | undefined;
|
|
1018
|
+
}
|
|
1019
|
+
/** A collection of Logs produced by a Scope. */
|
|
1020
|
+
interface ScopeLogs {
|
|
1021
|
+
/**
|
|
1022
|
+
* The instrumentation scope information for the logs in this message.
|
|
1023
|
+
* Semantically when InstrumentationScope isn't set, it is equivalent with
|
|
1024
|
+
* an empty instrumentation scope name (unknown).
|
|
1025
|
+
*/
|
|
1026
|
+
scope?: InstrumentationScope | undefined;
|
|
1027
|
+
/** A list of log records. */
|
|
1028
|
+
logRecords?: LogRecord[] | undefined;
|
|
1029
|
+
/**
|
|
1030
|
+
* The Schema URL, if known. This is the identifier of the Schema that the log data
|
|
1031
|
+
* is recorded in. Notably, the last part of the URL path is the version number of the
|
|
1032
|
+
* schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
|
|
1033
|
+
* https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
|
|
1034
|
+
* This schema_url applies to the data in the "scope" field and all logs in the
|
|
1035
|
+
* "log_records" field.
|
|
1036
|
+
*/
|
|
1037
|
+
schemaUrl?: string | undefined;
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* A log record according to OpenTelemetry Log Data Model:
|
|
1041
|
+
* https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md
|
|
1042
|
+
*/
|
|
1043
|
+
interface LogRecord {
|
|
1044
|
+
/**
|
|
1045
|
+
* time_unix_nano is the time when the event occurred.
|
|
1046
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
|
|
1047
|
+
* Value of 0 indicates unknown or missing timestamp.
|
|
1048
|
+
*/
|
|
1049
|
+
timeUnixNano?: string | undefined;
|
|
1050
|
+
/**
|
|
1051
|
+
* Time when the event was observed by the collection system.
|
|
1052
|
+
* For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
|
|
1053
|
+
* this timestamp is typically set at the generation time and is equal to Timestamp.
|
|
1054
|
+
* For events originating externally and collected by OpenTelemetry (e.g. using
|
|
1055
|
+
* Collector) this is the time when OpenTelemetry's code observed the event measured
|
|
1056
|
+
* by the clock of the OpenTelemetry code. This field MUST be set once the event is
|
|
1057
|
+
* observed by OpenTelemetry.
|
|
1058
|
+
*
|
|
1059
|
+
* For converting OpenTelemetry log data to formats that support only one timestamp or
|
|
1060
|
+
* when receiving OpenTelemetry log data by recipients that support only one timestamp
|
|
1061
|
+
* internally the following logic is recommended:
|
|
1062
|
+
* - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
|
|
1063
|
+
*
|
|
1064
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
|
|
1065
|
+
* Value of 0 indicates unknown or missing timestamp.
|
|
1066
|
+
*/
|
|
1067
|
+
observedTimeUnixNano?: string | undefined;
|
|
1068
|
+
/**
|
|
1069
|
+
* Numerical value of the severity, normalized to values described in Log Data Model.
|
|
1070
|
+
* [Optional].
|
|
1071
|
+
*/
|
|
1072
|
+
severityNumber?: SeverityNumber | undefined;
|
|
1073
|
+
/**
|
|
1074
|
+
* The severity text (also known as log level). The original string representation as
|
|
1075
|
+
* it is known at the source. [Optional].
|
|
1076
|
+
*/
|
|
1077
|
+
severityText?: string | undefined;
|
|
1078
|
+
/**
|
|
1079
|
+
* A value containing the body of the log record. Can be for example a human-readable
|
|
1080
|
+
* string message (including multi-line) describing the event in a free form or it can
|
|
1081
|
+
* be a structured data composed of arrays and maps of other values. [Optional].
|
|
1082
|
+
*/
|
|
1083
|
+
body?: AnyValue | undefined;
|
|
1084
|
+
/**
|
|
1085
|
+
* Additional attributes that describe the specific event occurrence. [Optional].
|
|
1086
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
1087
|
+
* attribute with the same key).
|
|
1088
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
1089
|
+
*/
|
|
1090
|
+
attributes?: KeyValue[] | undefined;
|
|
1091
|
+
droppedAttributesCount?: number | undefined;
|
|
1092
|
+
/**
|
|
1093
|
+
* Flags, a bit field. 8 least significant bits are the trace flags as
|
|
1094
|
+
* defined in W3C Trace Context specification. 24 most significant bits are reserved
|
|
1095
|
+
* and must be set to 0. Readers must not assume that 24 most significant bits
|
|
1096
|
+
* will be zero and must correctly mask the bits when reading 8-bit trace flag (use
|
|
1097
|
+
* flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].
|
|
1098
|
+
*/
|
|
1099
|
+
flags?: number | undefined;
|
|
1100
|
+
/**
|
|
1101
|
+
* A unique identifier for a trace. All logs from the same trace share
|
|
1102
|
+
* the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
|
|
1103
|
+
* of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
|
|
1104
|
+
* is zero-length and thus is also invalid).
|
|
1105
|
+
*
|
|
1106
|
+
* This field is optional.
|
|
1107
|
+
*
|
|
1108
|
+
* The receivers SHOULD assume that the log record is not associated with a
|
|
1109
|
+
* trace if any of the following is true:
|
|
1110
|
+
* - the field is not present,
|
|
1111
|
+
* - the field contains an invalid value.
|
|
1112
|
+
*/
|
|
1113
|
+
traceId?: string | undefined;
|
|
1114
|
+
/**
|
|
1115
|
+
* A unique identifier for a span within a trace, assigned when the span
|
|
1116
|
+
* is created. The ID is an 8-byte array. An ID with all zeroes OR of length
|
|
1117
|
+
* other than 8 bytes is considered invalid (empty string in OTLP/JSON
|
|
1118
|
+
* is zero-length and thus is also invalid).
|
|
1119
|
+
*
|
|
1120
|
+
* This field is optional. If the sender specifies a valid span_id then it SHOULD also
|
|
1121
|
+
* specify a valid trace_id.
|
|
1122
|
+
*
|
|
1123
|
+
* The receivers SHOULD assume that the log record is not associated with a
|
|
1124
|
+
* span if any of the following is true:
|
|
1125
|
+
* - the field is not present,
|
|
1126
|
+
* - the field contains an invalid value.
|
|
1127
|
+
*/
|
|
1128
|
+
spanId?: string | undefined;
|
|
1129
|
+
/**
|
|
1130
|
+
* A unique identifier of event category/type.
|
|
1131
|
+
* All events with the same event_name are expected to conform to the same
|
|
1132
|
+
* schema for both their attributes and their body.
|
|
1133
|
+
*
|
|
1134
|
+
* Recommended to be fully qualified and short (no longer than 256 characters).
|
|
1135
|
+
*
|
|
1136
|
+
* Presence of event_name on the log record identifies this record
|
|
1137
|
+
* as an event.
|
|
1138
|
+
*
|
|
1139
|
+
* [Optional].
|
|
1140
|
+
*/
|
|
1141
|
+
eventName?: string | undefined;
|
|
1142
|
+
}
|
|
1143
|
+
/**
|
|
1144
|
+
* AggregationTemporality defines how a metric aggregator reports aggregated
|
|
1145
|
+
* values. It describes how those values relate to the time interval over
|
|
1146
|
+
* which they are aggregated.
|
|
1147
|
+
*/
|
|
1148
|
+
declare enum AggregationTemporality {
|
|
1149
|
+
/** AGGREGATION_TEMPORALITY_UNSPECIFIED - UNSPECIFIED is the default AggregationTemporality, it MUST not be used. */
|
|
1150
|
+
AGGREGATION_TEMPORALITY_UNSPECIFIED = 0,
|
|
1151
|
+
/**
|
|
1152
|
+
* AGGREGATION_TEMPORALITY_DELTA - DELTA is an AggregationTemporality for a metric aggregator which reports
|
|
1153
|
+
* changes since last report time. Successive metrics contain aggregation of
|
|
1154
|
+
* values from continuous and non-overlapping intervals.
|
|
1155
|
+
*
|
|
1156
|
+
* The values for a DELTA metric are based only on the time interval
|
|
1157
|
+
* associated with one measurement cycle. There is no dependency on
|
|
1158
|
+
* previous measurements like is the case for CUMULATIVE metrics.
|
|
1159
|
+
*
|
|
1160
|
+
* For example, consider a system measuring the number of requests that
|
|
1161
|
+
* it receives and reports the sum of these requests every second as a
|
|
1162
|
+
* DELTA metric:
|
|
1163
|
+
*
|
|
1164
|
+
* 1. The system starts receiving at time=t_0.
|
|
1165
|
+
* 2. A request is received, the system measures 1 request.
|
|
1166
|
+
* 3. A request is received, the system measures 1 request.
|
|
1167
|
+
* 4. A request is received, the system measures 1 request.
|
|
1168
|
+
* 5. The 1 second collection cycle ends. A metric is exported for the
|
|
1169
|
+
* number of requests received over the interval of time t_0 to
|
|
1170
|
+
* t_0+1 with a value of 3.
|
|
1171
|
+
* 6. A request is received, the system measures 1 request.
|
|
1172
|
+
* 7. A request is received, the system measures 1 request.
|
|
1173
|
+
* 8. The 1 second collection cycle ends. A metric is exported for the
|
|
1174
|
+
* number of requests received over the interval of time t_0+1 to
|
|
1175
|
+
* t_0+2 with a value of 2.
|
|
1176
|
+
*/
|
|
1177
|
+
AGGREGATION_TEMPORALITY_DELTA = 1,
|
|
1178
|
+
/**
|
|
1179
|
+
* AGGREGATION_TEMPORALITY_CUMULATIVE - CUMULATIVE is an AggregationTemporality for a metric aggregator which
|
|
1180
|
+
* reports changes since a fixed start time. This means that current values
|
|
1181
|
+
* of a CUMULATIVE metric depend on all previous measurements since the
|
|
1182
|
+
* start time. Because of this, the sender is required to retain this state
|
|
1183
|
+
* in some form. If this state is lost or invalidated, the CUMULATIVE metric
|
|
1184
|
+
* values MUST be reset and a new fixed start time following the last
|
|
1185
|
+
* reported measurement time sent MUST be used.
|
|
1186
|
+
*
|
|
1187
|
+
* For example, consider a system measuring the number of requests that
|
|
1188
|
+
* it receives and reports the sum of these requests every second as a
|
|
1189
|
+
* CUMULATIVE metric:
|
|
1190
|
+
*
|
|
1191
|
+
* 1. The system starts receiving at time=t_0.
|
|
1192
|
+
* 2. A request is received, the system measures 1 request.
|
|
1193
|
+
* 3. A request is received, the system measures 1 request.
|
|
1194
|
+
* 4. A request is received, the system measures 1 request.
|
|
1195
|
+
* 5. The 1 second collection cycle ends. A metric is exported for the
|
|
1196
|
+
* number of requests received over the interval of time t_0 to
|
|
1197
|
+
* t_0+1 with a value of 3.
|
|
1198
|
+
* 6. A request is received, the system measures 1 request.
|
|
1199
|
+
* 7. A request is received, the system measures 1 request.
|
|
1200
|
+
* 8. The 1 second collection cycle ends. A metric is exported for the
|
|
1201
|
+
* number of requests received over the interval of time t_0 to
|
|
1202
|
+
* t_0+2 with a value of 5.
|
|
1203
|
+
* 9. The system experiences a fault and loses state.
|
|
1204
|
+
* 10. The system recovers and resumes receiving at time=t_1.
|
|
1205
|
+
* 11. A request is received, the system measures 1 request.
|
|
1206
|
+
* 12. The 1 second collection cycle ends. A metric is exported for the
|
|
1207
|
+
* number of requests received over the interval of time t_1 to
|
|
1208
|
+
* t_0+1 with a value of 1.
|
|
1209
|
+
*
|
|
1210
|
+
* Note: Even though, when reporting changes since last report time, using
|
|
1211
|
+
* CUMULATIVE is valid, it is not recommended. This may cause problems for
|
|
1212
|
+
* systems that do not use start_time to determine when the aggregation
|
|
1213
|
+
* value was reset (e.g. Prometheus).
|
|
1214
|
+
*/
|
|
1215
|
+
AGGREGATION_TEMPORALITY_CUMULATIVE = 2,
|
|
1216
|
+
UNRECOGNIZED = -1
|
|
1217
|
+
}
|
|
1218
|
+
/**
|
|
1219
|
+
* DataPointFlags is defined as a protobuf 'uint32' type and is to be used as a
|
|
1220
|
+
* bit-field representing 32 distinct boolean flags. Each flag defined in this
|
|
1221
|
+
* enum is a bit-mask. To test the presence of a single flag in the flags of
|
|
1222
|
+
* a data point, for example, use an expression like:
|
|
1223
|
+
*
|
|
1224
|
+
* (point.flags & DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK) == DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK
|
|
1225
|
+
*/
|
|
1226
|
+
declare enum DataPointFlags {
|
|
1227
|
+
/**
|
|
1228
|
+
* DATA_POINT_FLAGS_DO_NOT_USE - The zero value for the enum. Should not be used for comparisons.
|
|
1229
|
+
* Instead use bitwise "and" with the appropriate mask as shown above.
|
|
1230
|
+
*/
|
|
1231
|
+
DATA_POINT_FLAGS_DO_NOT_USE = 0,
|
|
1232
|
+
/**
|
|
1233
|
+
* DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK - This DataPoint is valid but has no recorded value. This value
|
|
1234
|
+
* SHOULD be used to reflect explicitly missing data in a series, as
|
|
1235
|
+
* for an equivalent to the Prometheus "staleness marker".
|
|
1236
|
+
*/
|
|
1237
|
+
DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK = 1,
|
|
1238
|
+
UNRECOGNIZED = -1
|
|
1239
|
+
}
|
|
1240
|
+
/**
|
|
1241
|
+
* MetricsData represents the metrics data that can be stored in a persistent
|
|
1242
|
+
* storage, OR can be embedded by other protocols that transfer OTLP metrics
|
|
1243
|
+
* data but do not implement the OTLP protocol.
|
|
1244
|
+
*
|
|
1245
|
+
* MetricsData
|
|
1246
|
+
* └─── ResourceMetrics
|
|
1247
|
+
* ├── Resource
|
|
1248
|
+
* ├── SchemaURL
|
|
1249
|
+
* └── ScopeMetrics
|
|
1250
|
+
* ├── Scope
|
|
1251
|
+
* ├── SchemaURL
|
|
1252
|
+
* └── Metric
|
|
1253
|
+
* ├── Name
|
|
1254
|
+
* ├── Description
|
|
1255
|
+
* ├── Unit
|
|
1256
|
+
* └── data
|
|
1257
|
+
* ├── Gauge
|
|
1258
|
+
* ├── Sum
|
|
1259
|
+
* ├── Histogram
|
|
1260
|
+
* ├── ExponentialHistogram
|
|
1261
|
+
* └── Summary
|
|
1262
|
+
*
|
|
1263
|
+
* The main difference between this message and collector protocol is that
|
|
1264
|
+
* in this message there will not be any "control" or "metadata" specific to
|
|
1265
|
+
* OTLP protocol.
|
|
1266
|
+
*
|
|
1267
|
+
* When new fields are added into this message, the OTLP request MUST be updated
|
|
1268
|
+
* as well.
|
|
1269
|
+
*/
|
|
1270
|
+
interface MetricsData$1 {
|
|
1271
|
+
/**
|
|
1272
|
+
* An array of ResourceMetrics.
|
|
1273
|
+
* For data coming from a single resource this array will typically contain
|
|
1274
|
+
* one element. Intermediary nodes that receive data from multiple origins
|
|
1275
|
+
* typically batch the data before forwarding further and in that case this
|
|
1276
|
+
* array will contain multiple elements.
|
|
1277
|
+
*/
|
|
1278
|
+
resourceMetrics?: ResourceMetrics$1[] | undefined;
|
|
1279
|
+
}
|
|
1280
|
+
/** A collection of ScopeMetrics from a Resource. */
|
|
1281
|
+
interface ResourceMetrics$1 {
|
|
1282
|
+
/**
|
|
1283
|
+
* The resource for the metrics in this message.
|
|
1284
|
+
* If this field is not set then no resource info is known.
|
|
1285
|
+
*/
|
|
1286
|
+
resource?: Resource | undefined;
|
|
1287
|
+
/** A list of metrics that originate from a resource. */
|
|
1288
|
+
scopeMetrics?: ScopeMetrics$1[] | undefined;
|
|
1289
|
+
/**
|
|
1290
|
+
* The Schema URL, if known. This is the identifier of the Schema that the resource data
|
|
1291
|
+
* is recorded in. Notably, the last part of the URL path is the version number of the
|
|
1292
|
+
* schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
|
|
1293
|
+
* https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
|
|
1294
|
+
* This schema_url applies to the data in the "resource" field. It does not apply
|
|
1295
|
+
* to the data in the "scope_metrics" field which have their own schema_url field.
|
|
1296
|
+
*/
|
|
1297
|
+
schemaUrl?: string | undefined;
|
|
1298
|
+
}
|
|
1299
|
+
/** A collection of Metrics produced by an Scope. */
|
|
1300
|
+
interface ScopeMetrics$1 {
|
|
1301
|
+
/**
|
|
1302
|
+
* The instrumentation scope information for the metrics in this message.
|
|
1303
|
+
* Semantically when InstrumentationScope isn't set, it is equivalent with
|
|
1304
|
+
* an empty instrumentation scope name (unknown).
|
|
1305
|
+
*/
|
|
1306
|
+
scope?: InstrumentationScope | undefined;
|
|
1307
|
+
/** A list of metrics that originate from an instrumentation library. */
|
|
1308
|
+
metrics?: Metric$1[] | undefined;
|
|
1309
|
+
/**
|
|
1310
|
+
* The Schema URL, if known. This is the identifier of the Schema that the metric data
|
|
1311
|
+
* is recorded in. Notably, the last part of the URL path is the version number of the
|
|
1312
|
+
* schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
|
|
1313
|
+
* https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
|
|
1314
|
+
* This schema_url applies to the data in the "scope" field and all metrics in the
|
|
1315
|
+
* "metrics" field.
|
|
1316
|
+
*/
|
|
1317
|
+
schemaUrl?: string | undefined;
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* Defines a Metric which has one or more timeseries. The following is a
|
|
1321
|
+
* brief summary of the Metric data model. For more details, see:
|
|
1322
|
+
*
|
|
1323
|
+
* https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md
|
|
1324
|
+
*
|
|
1325
|
+
* The data model and relation between entities is shown in the
|
|
1326
|
+
* diagram below. Here, "DataPoint" is the term used to refer to any
|
|
1327
|
+
* one of the specific data point value types, and "points" is the term used
|
|
1328
|
+
* to refer to any one of the lists of points contained in the Metric.
|
|
1329
|
+
*
|
|
1330
|
+
* - Metric is composed of a metadata and data.
|
|
1331
|
+
* - Metadata part contains a name, description, unit.
|
|
1332
|
+
* - Data is one of the possible types (Sum, Gauge, Histogram, Summary).
|
|
1333
|
+
* - DataPoint contains timestamps, attributes, and one of the possible value type
|
|
1334
|
+
* fields.
|
|
1335
|
+
*
|
|
1336
|
+
* Metric
|
|
1337
|
+
* +------------+
|
|
1338
|
+
* |name |
|
|
1339
|
+
* |description |
|
|
1340
|
+
* |unit | +------------------------------------+
|
|
1341
|
+
* |data |---> |Gauge, Sum, Histogram, Summary, ... |
|
|
1342
|
+
* +------------+ +------------------------------------+
|
|
1343
|
+
*
|
|
1344
|
+
* Data [One of Gauge, Sum, Histogram, Summary, ...]
|
|
1345
|
+
* +-----------+
|
|
1346
|
+
* |... | // Metadata about the Data.
|
|
1347
|
+
* |points |--+
|
|
1348
|
+
* +-----------+ |
|
|
1349
|
+
* | +---------------------------+
|
|
1350
|
+
* | |DataPoint 1 |
|
|
1351
|
+
* v |+------+------+ +------+ |
|
|
1352
|
+
* +-----+ ||label |label |...|label | |
|
|
1353
|
+
* | 1 |-->||value1|value2|...|valueN| |
|
|
1354
|
+
* +-----+ |+------+------+ +------+ |
|
|
1355
|
+
* | . | |+-----+ |
|
|
1356
|
+
* | . | ||value| |
|
|
1357
|
+
* | . | |+-----+ |
|
|
1358
|
+
* | . | +---------------------------+
|
|
1359
|
+
* | . | .
|
|
1360
|
+
* | . | .
|
|
1361
|
+
* | . | .
|
|
1362
|
+
* | . | +---------------------------+
|
|
1363
|
+
* | . | |DataPoint M |
|
|
1364
|
+
* +-----+ |+------+------+ +------+ |
|
|
1365
|
+
* | M |-->||label |label |...|label | |
|
|
1366
|
+
* +-----+ ||value1|value2|...|valueN| |
|
|
1367
|
+
* |+------+------+ +------+ |
|
|
1368
|
+
* |+-----+ |
|
|
1369
|
+
* ||value| |
|
|
1370
|
+
* |+-----+ |
|
|
1371
|
+
* +---------------------------+
|
|
1372
|
+
*
|
|
1373
|
+
* Each distinct type of DataPoint represents the output of a specific
|
|
1374
|
+
* aggregation function, the result of applying the DataPoint's
|
|
1375
|
+
* associated function of to one or more measurements.
|
|
1376
|
+
*
|
|
1377
|
+
* All DataPoint types have three common fields:
|
|
1378
|
+
* - Attributes includes key-value pairs associated with the data point
|
|
1379
|
+
* - TimeUnixNano is required, set to the end time of the aggregation
|
|
1380
|
+
* - StartTimeUnixNano is optional, but strongly encouraged for DataPoints
|
|
1381
|
+
* having an AggregationTemporality field, as discussed below.
|
|
1382
|
+
*
|
|
1383
|
+
* Both TimeUnixNano and StartTimeUnixNano values are expressed as
|
|
1384
|
+
* UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
|
|
1385
|
+
*
|
|
1386
|
+
* # TimeUnixNano
|
|
1387
|
+
*
|
|
1388
|
+
* This field is required, having consistent interpretation across
|
|
1389
|
+
* DataPoint types. TimeUnixNano is the moment corresponding to when
|
|
1390
|
+
* the data point's aggregate value was captured.
|
|
1391
|
+
*
|
|
1392
|
+
* Data points with the 0 value for TimeUnixNano SHOULD be rejected
|
|
1393
|
+
* by consumers.
|
|
1394
|
+
*
|
|
1395
|
+
* # StartTimeUnixNano
|
|
1396
|
+
*
|
|
1397
|
+
* StartTimeUnixNano in general allows detecting when a sequence of
|
|
1398
|
+
* observations is unbroken. This field indicates to consumers the
|
|
1399
|
+
* start time for points with cumulative and delta
|
|
1400
|
+
* AggregationTemporality, and it should be included whenever possible
|
|
1401
|
+
* to support correct rate calculation. Although it may be omitted
|
|
1402
|
+
* when the start time is truly unknown, setting StartTimeUnixNano is
|
|
1403
|
+
* strongly encouraged.
|
|
1404
|
+
*/
|
|
1405
|
+
interface Metric$1 {
|
|
1406
|
+
/** The name of the metric. */
|
|
1407
|
+
name?: string | undefined;
|
|
1408
|
+
/** A description of the metric, which can be used in documentation. */
|
|
1409
|
+
description?: string | undefined;
|
|
1410
|
+
/**
|
|
1411
|
+
* The unit in which the metric value is reported. Follows the format
|
|
1412
|
+
* described by https://unitsofmeasure.org/ucum.html.
|
|
1413
|
+
*/
|
|
1414
|
+
unit?: string | undefined;
|
|
1415
|
+
gauge?: Gauge$1 | undefined;
|
|
1416
|
+
sum?: Sum$1 | undefined;
|
|
1417
|
+
histogram?: Histogram$1 | undefined;
|
|
1418
|
+
exponentialHistogram?: ExponentialHistogram$1 | undefined;
|
|
1419
|
+
summary?: Summary$1 | undefined;
|
|
1420
|
+
/**
|
|
1421
|
+
* Additional metadata attributes that describe the metric. [Optional].
|
|
1422
|
+
* Attributes are non-identifying.
|
|
1423
|
+
* Consumers SHOULD NOT need to be aware of these attributes.
|
|
1424
|
+
* These attributes MAY be used to encode information allowing
|
|
1425
|
+
* for lossless roundtrip translation to / from another data model.
|
|
1426
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
1427
|
+
* attribute with the same key).
|
|
1428
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
1429
|
+
*/
|
|
1430
|
+
metadata?: KeyValue[] | undefined;
|
|
1431
|
+
}
|
|
1432
|
+
/**
|
|
1433
|
+
* Gauge represents the type of a scalar metric that always exports the
|
|
1434
|
+
* "current value" for every data point. It should be used for an "unknown"
|
|
1435
|
+
* aggregation.
|
|
1436
|
+
*
|
|
1437
|
+
* A Gauge does not support different aggregation temporalities. Given the
|
|
1438
|
+
* aggregation is unknown, points cannot be combined using the same
|
|
1439
|
+
* aggregation, regardless of aggregation temporalities. Therefore,
|
|
1440
|
+
* AggregationTemporality is not included. Consequently, this also means
|
|
1441
|
+
* "StartTimeUnixNano" is ignored for all data points.
|
|
1442
|
+
*/
|
|
1443
|
+
interface Gauge$1 {
|
|
1444
|
+
/**
|
|
1445
|
+
* The time series data points.
|
|
1446
|
+
* Note: Multiple time series may be included (same timestamp, different attributes).
|
|
1447
|
+
*/
|
|
1448
|
+
dataPoints?: NumberDataPoint$1[] | undefined;
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
* Sum represents the type of a scalar metric that is calculated as a sum of all
|
|
1452
|
+
* reported measurements over a time interval.
|
|
1453
|
+
*/
|
|
1454
|
+
interface Sum$1 {
|
|
1455
|
+
/**
|
|
1456
|
+
* The time series data points.
|
|
1457
|
+
* Note: Multiple time series may be included (same timestamp, different attributes).
|
|
1458
|
+
*/
|
|
1459
|
+
dataPoints?: NumberDataPoint$1[] | undefined;
|
|
1460
|
+
/**
|
|
1461
|
+
* aggregation_temporality describes if the aggregator reports delta changes
|
|
1462
|
+
* since last report time, or cumulative changes since a fixed start time.
|
|
1463
|
+
*/
|
|
1464
|
+
aggregationTemporality?: AggregationTemporality | undefined;
|
|
1465
|
+
/** Represents whether the sum is monotonic. */
|
|
1466
|
+
isMonotonic?: boolean | undefined;
|
|
1467
|
+
}
|
|
1468
|
+
/**
|
|
1469
|
+
* Histogram represents the type of a metric that is calculated by aggregating
|
|
1470
|
+
* as a Histogram of all reported measurements over a time interval.
|
|
1471
|
+
*/
|
|
1472
|
+
interface Histogram$1 {
|
|
1473
|
+
/**
|
|
1474
|
+
* The time series data points.
|
|
1475
|
+
* Note: Multiple time series may be included (same timestamp, different attributes).
|
|
1476
|
+
*/
|
|
1477
|
+
dataPoints?: HistogramDataPoint$1[] | undefined;
|
|
1478
|
+
/**
|
|
1479
|
+
* aggregation_temporality describes if the aggregator reports delta changes
|
|
1480
|
+
* since last report time, or cumulative changes since a fixed start time.
|
|
1481
|
+
*/
|
|
1482
|
+
aggregationTemporality?: AggregationTemporality | undefined;
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* ExponentialHistogram represents the type of a metric that is calculated by aggregating
|
|
1486
|
+
* as a ExponentialHistogram of all reported double measurements over a time interval.
|
|
1487
|
+
*/
|
|
1488
|
+
interface ExponentialHistogram$1 {
|
|
1489
|
+
/**
|
|
1490
|
+
* The time series data points.
|
|
1491
|
+
* Note: Multiple time series may be included (same timestamp, different attributes).
|
|
1492
|
+
*/
|
|
1493
|
+
dataPoints?: ExponentialHistogramDataPoint$1[] | undefined;
|
|
1494
|
+
/**
|
|
1495
|
+
* aggregation_temporality describes if the aggregator reports delta changes
|
|
1496
|
+
* since last report time, or cumulative changes since a fixed start time.
|
|
1497
|
+
*/
|
|
1498
|
+
aggregationTemporality?: AggregationTemporality | undefined;
|
|
1499
|
+
}
|
|
1500
|
+
/**
|
|
1501
|
+
* Summary metric data are used to convey quantile summaries,
|
|
1502
|
+
* a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary)
|
|
1503
|
+
* and OpenMetrics (see: https://github.com/prometheus/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45)
|
|
1504
|
+
* data type. These data points cannot always be merged in a meaningful way.
|
|
1505
|
+
* While they can be useful in some applications, histogram data points are
|
|
1506
|
+
* recommended for new applications.
|
|
1507
|
+
* Summary metrics do not have an aggregation temporality field. This is
|
|
1508
|
+
* because the count and sum fields of a SummaryDataPoint are assumed to be
|
|
1509
|
+
* cumulative values.
|
|
1510
|
+
*/
|
|
1511
|
+
interface Summary$1 {
|
|
1512
|
+
/**
|
|
1513
|
+
* The time series data points.
|
|
1514
|
+
* Note: Multiple time series may be included (same timestamp, different attributes).
|
|
1515
|
+
*/
|
|
1516
|
+
dataPoints?: SummaryDataPoint$1[] | undefined;
|
|
1517
|
+
}
|
|
1518
|
+
/**
|
|
1519
|
+
* NumberDataPoint is a single data point in a timeseries that describes the
|
|
1520
|
+
* time-varying scalar value of a metric.
|
|
1521
|
+
*/
|
|
1522
|
+
interface NumberDataPoint$1 {
|
|
1523
|
+
/**
|
|
1524
|
+
* The set of key/value pairs that uniquely identify the timeseries from
|
|
1525
|
+
* where this point belongs. The list may be empty (may contain 0 elements).
|
|
1526
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
1527
|
+
* attribute with the same key).
|
|
1528
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
1529
|
+
*/
|
|
1530
|
+
attributes?: KeyValue[] | undefined;
|
|
1531
|
+
/**
|
|
1532
|
+
* StartTimeUnixNano is optional but strongly encouraged, see the
|
|
1533
|
+
* the detailed comments above Metric.
|
|
1534
|
+
*
|
|
1535
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
1536
|
+
* 1970.
|
|
1537
|
+
*/
|
|
1538
|
+
startTimeUnixNano?: string | undefined;
|
|
1539
|
+
/**
|
|
1540
|
+
* TimeUnixNano is required, see the detailed comments above Metric.
|
|
1541
|
+
*
|
|
1542
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
1543
|
+
* 1970.
|
|
1544
|
+
*/
|
|
1545
|
+
timeUnixNano?: string | undefined;
|
|
1546
|
+
asDouble?: number | undefined;
|
|
1547
|
+
asInt?: string | undefined;
|
|
1548
|
+
/**
|
|
1549
|
+
* (Optional) List of exemplars collected from
|
|
1550
|
+
* measurements that were used to form the data point
|
|
1551
|
+
*/
|
|
1552
|
+
exemplars?: Exemplar$1[] | undefined;
|
|
1553
|
+
/**
|
|
1554
|
+
* Flags that apply to this specific data point. See DataPointFlags
|
|
1555
|
+
* for the available flags and their meaning.
|
|
1556
|
+
*/
|
|
1557
|
+
flags?: number | undefined;
|
|
1558
|
+
}
|
|
1559
|
+
/**
|
|
1560
|
+
* HistogramDataPoint is a single data point in a timeseries that describes the
|
|
1561
|
+
* time-varying values of a Histogram. A Histogram contains summary statistics
|
|
1562
|
+
* for a population of values, it may optionally contain the distribution of
|
|
1563
|
+
* those values across a set of buckets.
|
|
1564
|
+
*
|
|
1565
|
+
* If the histogram contains the distribution of values, then both
|
|
1566
|
+
* "explicit_bounds" and "bucket counts" fields must be defined.
|
|
1567
|
+
* If the histogram does not contain the distribution of values, then both
|
|
1568
|
+
* "explicit_bounds" and "bucket_counts" must be omitted and only "count" and
|
|
1569
|
+
* "sum" are known.
|
|
1570
|
+
*/
|
|
1571
|
+
interface HistogramDataPoint$1 {
|
|
1572
|
+
/**
|
|
1573
|
+
* The set of key/value pairs that uniquely identify the timeseries from
|
|
1574
|
+
* where this point belongs. The list may be empty (may contain 0 elements).
|
|
1575
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
1576
|
+
* attribute with the same key).
|
|
1577
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
1578
|
+
*/
|
|
1579
|
+
attributes?: KeyValue[] | undefined;
|
|
1580
|
+
/**
|
|
1581
|
+
* StartTimeUnixNano is optional but strongly encouraged, see the
|
|
1582
|
+
* the detailed comments above Metric.
|
|
1583
|
+
*
|
|
1584
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
1585
|
+
* 1970.
|
|
1586
|
+
*/
|
|
1587
|
+
startTimeUnixNano?: string | undefined;
|
|
1588
|
+
/**
|
|
1589
|
+
* TimeUnixNano is required, see the detailed comments above Metric.
|
|
1590
|
+
*
|
|
1591
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
1592
|
+
* 1970.
|
|
1593
|
+
*/
|
|
1594
|
+
timeUnixNano?: string | undefined;
|
|
1595
|
+
/**
|
|
1596
|
+
* count is the number of values in the population. Must be non-negative. This
|
|
1597
|
+
* value must be equal to the sum of the "count" fields in buckets if a
|
|
1598
|
+
* histogram is provided.
|
|
1599
|
+
*/
|
|
1600
|
+
count?: string | number | undefined;
|
|
1601
|
+
/**
|
|
1602
|
+
* sum of the values in the population. If count is zero then this field
|
|
1603
|
+
* must be zero.
|
|
1604
|
+
*
|
|
1605
|
+
* Note: Sum should only be filled out when measuring non-negative discrete
|
|
1606
|
+
* events, and is assumed to be monotonic over the values of these events.
|
|
1607
|
+
* Negative events *can* be recorded, but sum should not be filled out when
|
|
1608
|
+
* doing so. This is specifically to enforce compatibility w/ OpenMetrics,
|
|
1609
|
+
* see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram
|
|
1610
|
+
*/
|
|
1611
|
+
sum?: number | undefined;
|
|
1612
|
+
/**
|
|
1613
|
+
* bucket_counts is an optional field contains the count values of histogram
|
|
1614
|
+
* for each bucket.
|
|
1615
|
+
*
|
|
1616
|
+
* The sum of the bucket_counts must equal the value in the count field.
|
|
1617
|
+
*
|
|
1618
|
+
* The number of elements in bucket_counts array must be by one greater than
|
|
1619
|
+
* the number of elements in explicit_bounds array. The exception to this rule
|
|
1620
|
+
* is when the length of bucket_counts is 0, then the length of explicit_bounds
|
|
1621
|
+
* must also be 0.
|
|
1622
|
+
*/
|
|
1623
|
+
bucketCounts?: number[] | undefined;
|
|
1624
|
+
/**
|
|
1625
|
+
* explicit_bounds specifies buckets with explicitly defined bounds for values.
|
|
1626
|
+
*
|
|
1627
|
+
* The boundaries for bucket at index i are:
|
|
1628
|
+
*
|
|
1629
|
+
* (-infinity, explicit_bounds[i]] for i == 0
|
|
1630
|
+
* (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
|
|
1631
|
+
* (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
|
|
1632
|
+
*
|
|
1633
|
+
* The values in the explicit_bounds array must be strictly increasing.
|
|
1634
|
+
*
|
|
1635
|
+
* Histogram buckets are inclusive of their upper boundary, except the last
|
|
1636
|
+
* bucket where the boundary is at infinity. This format is intentionally
|
|
1637
|
+
* compatible with the OpenMetrics histogram definition.
|
|
1638
|
+
*
|
|
1639
|
+
* If bucket_counts length is 0 then explicit_bounds length must also be 0,
|
|
1640
|
+
* otherwise the data point is invalid.
|
|
1641
|
+
*/
|
|
1642
|
+
explicitBounds?: number[] | undefined;
|
|
1643
|
+
/**
|
|
1644
|
+
* (Optional) List of exemplars collected from
|
|
1645
|
+
* measurements that were used to form the data point
|
|
1646
|
+
*/
|
|
1647
|
+
exemplars?: Exemplar$1[] | undefined;
|
|
1648
|
+
/**
|
|
1649
|
+
* Flags that apply to this specific data point. See DataPointFlags
|
|
1650
|
+
* for the available flags and their meaning.
|
|
1651
|
+
*/
|
|
1652
|
+
flags?: number | undefined;
|
|
1653
|
+
/** min is the minimum value over (start_time, end_time]. */
|
|
1654
|
+
min?: number | undefined;
|
|
1655
|
+
/** max is the maximum value over (start_time, end_time]. */
|
|
1656
|
+
max?: number | undefined;
|
|
1657
|
+
}
|
|
1658
|
+
/**
|
|
1659
|
+
* ExponentialHistogramDataPoint is a single data point in a timeseries that describes the
|
|
1660
|
+
* time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains
|
|
1661
|
+
* summary statistics for a population of values, it may optionally contain the
|
|
1662
|
+
* distribution of those values across a set of buckets.
|
|
1663
|
+
*/
|
|
1664
|
+
interface ExponentialHistogramDataPoint$1 {
|
|
1665
|
+
/**
|
|
1666
|
+
* The set of key/value pairs that uniquely identify the timeseries from
|
|
1667
|
+
* where this point belongs. The list may be empty (may contain 0 elements).
|
|
1668
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
1669
|
+
* attribute with the same key).
|
|
1670
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
1671
|
+
*/
|
|
1672
|
+
attributes?: KeyValue[] | undefined;
|
|
1673
|
+
/**
|
|
1674
|
+
* StartTimeUnixNano is optional but strongly encouraged, see the
|
|
1675
|
+
* the detailed comments above Metric.
|
|
1676
|
+
*
|
|
1677
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
1678
|
+
* 1970.
|
|
1679
|
+
*/
|
|
1680
|
+
startTimeUnixNano?: string | undefined;
|
|
1681
|
+
/**
|
|
1682
|
+
* TimeUnixNano is required, see the detailed comments above Metric.
|
|
1683
|
+
*
|
|
1684
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
1685
|
+
* 1970.
|
|
1686
|
+
*/
|
|
1687
|
+
timeUnixNano?: string | undefined;
|
|
1688
|
+
/**
|
|
1689
|
+
* The number of values in the population. Must be
|
|
1690
|
+
* non-negative. This value must be equal to the sum of the "bucket_counts"
|
|
1691
|
+
* values in the positive and negative Buckets plus the "zero_count" field.
|
|
1692
|
+
*/
|
|
1693
|
+
count?: string | number | undefined;
|
|
1694
|
+
/**
|
|
1695
|
+
* The sum of the values in the population. If count is zero then this field
|
|
1696
|
+
* must be zero.
|
|
1697
|
+
*
|
|
1698
|
+
* Note: Sum should only be filled out when measuring non-negative discrete
|
|
1699
|
+
* events, and is assumed to be monotonic over the values of these events.
|
|
1700
|
+
* Negative events *can* be recorded, but sum should not be filled out when
|
|
1701
|
+
* doing so. This is specifically to enforce compatibility w/ OpenMetrics,
|
|
1702
|
+
* see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram
|
|
1703
|
+
*/
|
|
1704
|
+
sum?: number | undefined;
|
|
1705
|
+
/**
|
|
1706
|
+
* scale describes the resolution of the histogram. Boundaries are
|
|
1707
|
+
* located at powers of the base, where:
|
|
1708
|
+
*
|
|
1709
|
+
* base = (2^(2^-scale))
|
|
1710
|
+
*
|
|
1711
|
+
* The histogram bucket identified by `index`, a signed integer,
|
|
1712
|
+
* contains values that are greater than (base^index) and
|
|
1713
|
+
* less than or equal to (base^(index+1)).
|
|
1714
|
+
*
|
|
1715
|
+
* The positive and negative ranges of the histogram are expressed
|
|
1716
|
+
* separately. Negative values are mapped by their absolute value
|
|
1717
|
+
* into the negative range using the same scale as the positive range.
|
|
1718
|
+
*
|
|
1719
|
+
* scale is not restricted by the protocol, as the permissible
|
|
1720
|
+
* values depend on the range of the data.
|
|
1721
|
+
*/
|
|
1722
|
+
scale?: number | undefined;
|
|
1723
|
+
/**
|
|
1724
|
+
* The count of values that are either exactly zero or
|
|
1725
|
+
* within the region considered zero by the instrumentation at the
|
|
1726
|
+
* tolerated degree of precision. This bucket stores values that
|
|
1727
|
+
* cannot be expressed using the standard exponential formula as
|
|
1728
|
+
* well as values that have been rounded to zero.
|
|
1729
|
+
*
|
|
1730
|
+
* Implementations MAY consider the zero bucket to have probability
|
|
1731
|
+
* mass equal to (zero_count / count).
|
|
1732
|
+
*/
|
|
1733
|
+
zeroCount?: number | undefined;
|
|
1734
|
+
/** positive carries the positive range of exponential bucket counts. */
|
|
1735
|
+
positive?: ExponentialHistogramDataPoint_Buckets$1 | undefined;
|
|
1736
|
+
/** negative carries the negative range of exponential bucket counts. */
|
|
1737
|
+
negative?: ExponentialHistogramDataPoint_Buckets$1 | undefined;
|
|
1738
|
+
/**
|
|
1739
|
+
* Flags that apply to this specific data point. See DataPointFlags
|
|
1740
|
+
* for the available flags and their meaning.
|
|
1741
|
+
*/
|
|
1742
|
+
flags?: number | undefined;
|
|
1743
|
+
/**
|
|
1744
|
+
* (Optional) List of exemplars collected from
|
|
1745
|
+
* measurements that were used to form the data point
|
|
1746
|
+
*/
|
|
1747
|
+
exemplars?: Exemplar$1[] | undefined;
|
|
1748
|
+
/** The minimum value over (start_time, end_time]. */
|
|
1749
|
+
min?: number | undefined;
|
|
1750
|
+
/** The maximum value over (start_time, end_time]. */
|
|
1751
|
+
max?: number | undefined;
|
|
1752
|
+
/**
|
|
1753
|
+
* ZeroThreshold may be optionally set to convey the width of the zero
|
|
1754
|
+
* region. Where the zero region is defined as the closed interval
|
|
1755
|
+
* [-ZeroThreshold, ZeroThreshold].
|
|
1756
|
+
* When ZeroThreshold is 0, zero count bucket stores values that cannot be
|
|
1757
|
+
* expressed using the standard exponential formula as well as values that
|
|
1758
|
+
* have been rounded to zero.
|
|
1759
|
+
*/
|
|
1760
|
+
zeroThreshold?: number | undefined;
|
|
1761
|
+
}
|
|
1762
|
+
/**
|
|
1763
|
+
* Buckets are a set of bucket counts, encoded in a contiguous array
|
|
1764
|
+
* of counts.
|
|
1765
|
+
*/
|
|
1766
|
+
interface ExponentialHistogramDataPoint_Buckets$1 {
|
|
1767
|
+
/**
|
|
1768
|
+
* The bucket index of the first entry in the bucket_counts array.
|
|
1769
|
+
*
|
|
1770
|
+
* Note: This uses a varint encoding as a simple form of compression.
|
|
1771
|
+
*/
|
|
1772
|
+
offset?: number | undefined;
|
|
1773
|
+
/**
|
|
1774
|
+
* An array of count values, where bucket_counts[i] carries
|
|
1775
|
+
* the count of the bucket at index (offset+i). bucket_counts[i] is the count
|
|
1776
|
+
* of values greater than base^(offset+i) and less than or equal to
|
|
1777
|
+
* base^(offset+i+1).
|
|
1778
|
+
*
|
|
1779
|
+
* Note: By contrast, the explicit HistogramDataPoint uses
|
|
1780
|
+
* fixed64. This field is expected to have many buckets,
|
|
1781
|
+
* especially zeros, so uint64 has been selected to ensure
|
|
1782
|
+
* varint encoding.
|
|
1783
|
+
*/
|
|
1784
|
+
bucketCounts?: (string | number)[] | undefined;
|
|
1785
|
+
}
|
|
1786
|
+
/**
|
|
1787
|
+
* SummaryDataPoint is a single data point in a timeseries that describes the
|
|
1788
|
+
* time-varying values of a Summary metric. The count and sum fields represent
|
|
1789
|
+
* cumulative values.
|
|
1790
|
+
*/
|
|
1791
|
+
interface SummaryDataPoint$1 {
|
|
1792
|
+
/**
|
|
1793
|
+
* The set of key/value pairs that uniquely identify the timeseries from
|
|
1794
|
+
* where this point belongs. The list may be empty (may contain 0 elements).
|
|
1795
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
1796
|
+
* attribute with the same key).
|
|
1797
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
1798
|
+
*/
|
|
1799
|
+
attributes?: KeyValue[] | undefined;
|
|
1800
|
+
/**
|
|
1801
|
+
* StartTimeUnixNano is optional but strongly encouraged, see the
|
|
1802
|
+
* the detailed comments above Metric.
|
|
1803
|
+
*
|
|
1804
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
1805
|
+
* 1970.
|
|
1806
|
+
*/
|
|
1807
|
+
startTimeUnixNano?: string | undefined;
|
|
1808
|
+
/**
|
|
1809
|
+
* TimeUnixNano is required, see the detailed comments above Metric.
|
|
1810
|
+
*
|
|
1811
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
1812
|
+
* 1970.
|
|
1813
|
+
*/
|
|
1814
|
+
timeUnixNano?: string | undefined;
|
|
1815
|
+
/** count is the number of values in the population. Must be non-negative. */
|
|
1816
|
+
count?: string | number | undefined;
|
|
1817
|
+
/**
|
|
1818
|
+
* sum of the values in the population. If count is zero then this field
|
|
1819
|
+
* must be zero.
|
|
1820
|
+
*
|
|
1821
|
+
* Note: Sum should only be filled out when measuring non-negative discrete
|
|
1822
|
+
* events, and is assumed to be monotonic over the values of these events.
|
|
1823
|
+
* Negative events *can* be recorded, but sum should not be filled out when
|
|
1824
|
+
* doing so. This is specifically to enforce compatibility w/ OpenMetrics,
|
|
1825
|
+
* see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#summary
|
|
1826
|
+
*/
|
|
1827
|
+
sum?: number | undefined;
|
|
1828
|
+
/**
|
|
1829
|
+
* (Optional) list of values at different quantiles of the distribution calculated
|
|
1830
|
+
* from the current snapshot. The quantiles must be strictly increasing.
|
|
1831
|
+
*/
|
|
1832
|
+
quantileValues?: SummaryDataPoint_ValueAtQuantile$1[] | undefined;
|
|
1833
|
+
/**
|
|
1834
|
+
* Flags that apply to this specific data point. See DataPointFlags
|
|
1835
|
+
* for the available flags and their meaning.
|
|
1836
|
+
*/
|
|
1837
|
+
flags?: number | undefined;
|
|
1838
|
+
}
|
|
1839
|
+
/**
|
|
1840
|
+
* Represents the value at a given quantile of a distribution.
|
|
1841
|
+
*
|
|
1842
|
+
* To record Min and Max values following conventions are used:
|
|
1843
|
+
* - The 1.0 quantile is equivalent to the maximum value observed.
|
|
1844
|
+
* - The 0.0 quantile is equivalent to the minimum value observed.
|
|
1845
|
+
*
|
|
1846
|
+
* See the following issue for more context:
|
|
1847
|
+
* https://github.com/open-telemetry/opentelemetry-proto/issues/125
|
|
1848
|
+
*/
|
|
1849
|
+
interface SummaryDataPoint_ValueAtQuantile$1 {
|
|
1850
|
+
/**
|
|
1851
|
+
* The quantile of a distribution. Must be in the interval
|
|
1852
|
+
* [0.0, 1.0].
|
|
1853
|
+
*/
|
|
1854
|
+
quantile?: number | undefined;
|
|
1855
|
+
/**
|
|
1856
|
+
* The value at the given quantile of a distribution.
|
|
1857
|
+
*
|
|
1858
|
+
* Quantile values must NOT be negative.
|
|
1859
|
+
*/
|
|
1860
|
+
value?: number | undefined;
|
|
1861
|
+
}
|
|
1862
|
+
/**
|
|
1863
|
+
* A representation of an exemplar, which is a sample input measurement.
|
|
1864
|
+
* Exemplars also hold information about the environment when the measurement
|
|
1865
|
+
* was recorded, for example the span and trace ID of the active span when the
|
|
1866
|
+
* exemplar was recorded.
|
|
1867
|
+
*/
|
|
1868
|
+
interface Exemplar$1 {
|
|
1869
|
+
/**
|
|
1870
|
+
* The set of key/value pairs that were filtered out by the aggregator, but
|
|
1871
|
+
* recorded alongside the original measurement. Only key/value pairs that were
|
|
1872
|
+
* filtered out by the aggregator should be included
|
|
1873
|
+
*/
|
|
1874
|
+
filteredAttributes?: KeyValue[] | undefined;
|
|
1875
|
+
/**
|
|
1876
|
+
* time_unix_nano is the exact time when this exemplar was recorded
|
|
1877
|
+
*
|
|
1878
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
1879
|
+
* 1970.
|
|
1880
|
+
*/
|
|
1881
|
+
timeUnixNano?: string | undefined;
|
|
1882
|
+
asDouble?: number | undefined;
|
|
1883
|
+
asInt?: string | undefined;
|
|
1884
|
+
/**
|
|
1885
|
+
* (Optional) Span ID of the exemplar trace.
|
|
1886
|
+
* span_id may be missing if the measurement is not recorded inside a trace
|
|
1887
|
+
* or if the trace is not sampled.
|
|
1888
|
+
*/
|
|
1889
|
+
spanId?: string | undefined;
|
|
1890
|
+
/**
|
|
1891
|
+
* (Optional) Trace ID of the exemplar trace.
|
|
1892
|
+
* trace_id may be missing if the measurement is not recorded inside a trace
|
|
1893
|
+
* or if the trace is not sampled.
|
|
1894
|
+
*/
|
|
1895
|
+
traceId?: Uint8Array | undefined;
|
|
1896
|
+
}
|
|
1897
|
+
declare namespace otlp_metrics_generated_d_exports {
|
|
1898
|
+
export { Exemplar, ExponentialHistogram, ExponentialHistogramDataPoint, ExponentialHistogramDataPoint_Buckets, Gauge, Histogram, HistogramDataPoint, Metric, MetricsData, NumberDataPoint, ResourceMetrics, ScopeMetrics, Sum, Summary, SummaryDataPoint, SummaryDataPoint_ValueAtQuantile };
|
|
1899
|
+
}
|
|
1900
|
+
/**
|
|
1901
|
+
* MetricsData represents the metrics data that can be stored in a persistent
|
|
1902
|
+
* storage, OR can be embedded by other protocols that transfer OTLP metrics
|
|
1903
|
+
* data but do not implement the OTLP protocol.
|
|
1904
|
+
*
|
|
1905
|
+
* MetricsData
|
|
1906
|
+
* └─── ResourceMetrics
|
|
1907
|
+
* ├── Resource
|
|
1908
|
+
* ├── SchemaURL
|
|
1909
|
+
* └── ScopeMetrics
|
|
1910
|
+
* ├── Scope
|
|
1911
|
+
* ├── SchemaURL
|
|
1912
|
+
* └── Metric
|
|
1913
|
+
* ├── Name
|
|
1914
|
+
* ├── Description
|
|
1915
|
+
* ├── Unit
|
|
1916
|
+
* └── data
|
|
1917
|
+
* ├── Gauge
|
|
1918
|
+
* ├── Sum
|
|
1919
|
+
* ├── Histogram
|
|
1920
|
+
* ├── ExponentialHistogram
|
|
1921
|
+
* └── Summary
|
|
1922
|
+
*
|
|
1923
|
+
* The main difference between this message and collector protocol is that
|
|
1924
|
+
* in this message there will not be any "control" or "metadata" specific to
|
|
1925
|
+
* OTLP protocol.
|
|
1926
|
+
*
|
|
1927
|
+
* When new fields are added into this message, the OTLP request MUST be updated
|
|
1928
|
+
* as well.
|
|
1929
|
+
*/
|
|
1930
|
+
interface MetricsData {
|
|
1931
|
+
/**
|
|
1932
|
+
* An array of ResourceMetrics.
|
|
1933
|
+
* For data coming from a single resource this array will typically contain
|
|
1934
|
+
* one element. Intermediary nodes that receive data from multiple origins
|
|
1935
|
+
* typically batch the data before forwarding further and in that case this
|
|
1936
|
+
* array will contain multiple elements.
|
|
1937
|
+
*/
|
|
1938
|
+
resourceMetrics?: ResourceMetrics[] | undefined;
|
|
1939
|
+
}
|
|
1940
|
+
/** A collection of ScopeMetrics from a Resource. */
|
|
1941
|
+
interface ResourceMetrics {
|
|
1942
|
+
/**
|
|
1943
|
+
* The resource for the metrics in this message.
|
|
1944
|
+
* If this field is not set then no resource info is known.
|
|
1945
|
+
*/
|
|
1946
|
+
resource?: Resource | undefined;
|
|
1947
|
+
/** A list of metrics that originate from a resource. */
|
|
1948
|
+
scopeMetrics?: ScopeMetrics[] | undefined;
|
|
1949
|
+
/**
|
|
1950
|
+
* The Schema URL, if known. This is the identifier of the Schema that the resource data
|
|
1951
|
+
* is recorded in. Notably, the last part of the URL path is the version number of the
|
|
1952
|
+
* schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
|
|
1953
|
+
* https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
|
|
1954
|
+
* This schema_url applies to the data in the "resource" field. It does not apply
|
|
1955
|
+
* to the data in the "scope_metrics" field which have their own schema_url field.
|
|
1956
|
+
*/
|
|
1957
|
+
schemaUrl?: string | undefined;
|
|
1958
|
+
}
|
|
1959
|
+
/** A collection of Metrics produced by an Scope. */
|
|
1960
|
+
interface ScopeMetrics {
|
|
1961
|
+
/**
|
|
1962
|
+
* The instrumentation scope information for the metrics in this message.
|
|
1963
|
+
* Semantically when InstrumentationScope isn't set, it is equivalent with
|
|
1964
|
+
* an empty instrumentation scope name (unknown).
|
|
1965
|
+
*/
|
|
1966
|
+
scope?: InstrumentationScope | undefined;
|
|
1967
|
+
/** A list of metrics that originate from an instrumentation library. */
|
|
1968
|
+
metrics?: Metric[] | undefined;
|
|
1969
|
+
/**
|
|
1970
|
+
* The Schema URL, if known. This is the identifier of the Schema that the metric data
|
|
1971
|
+
* is recorded in. Notably, the last part of the URL path is the version number of the
|
|
1972
|
+
* schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
|
|
1973
|
+
* https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
|
|
1974
|
+
* This schema_url applies to the data in the "scope" field and all metrics in the
|
|
1975
|
+
* "metrics" field.
|
|
1976
|
+
*/
|
|
1977
|
+
schemaUrl?: string | undefined;
|
|
1978
|
+
}
|
|
1979
|
+
/**
|
|
1980
|
+
* Defines a Metric which has one or more timeseries. The following is a
|
|
1981
|
+
* brief summary of the Metric data model. For more details, see:
|
|
1982
|
+
*
|
|
1983
|
+
* https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md
|
|
1984
|
+
*
|
|
1985
|
+
* The data model and relation between entities is shown in the
|
|
1986
|
+
* diagram below. Here, "DataPoint" is the term used to refer to any
|
|
1987
|
+
* one of the specific data point value types, and "points" is the term used
|
|
1988
|
+
* to refer to any one of the lists of points contained in the Metric.
|
|
1989
|
+
*
|
|
1990
|
+
* - Metric is composed of a metadata and data.
|
|
1991
|
+
* - Metadata part contains a name, description, unit.
|
|
1992
|
+
* - Data is one of the possible types (Sum, Gauge, Histogram, Summary).
|
|
1993
|
+
* - DataPoint contains timestamps, attributes, and one of the possible value type
|
|
1994
|
+
* fields.
|
|
1995
|
+
*
|
|
1996
|
+
* Metric
|
|
1997
|
+
* +------------+
|
|
1998
|
+
* |name |
|
|
1999
|
+
* |description |
|
|
2000
|
+
* |unit | +------------------------------------+
|
|
2001
|
+
* |data |---> |Gauge, Sum, Histogram, Summary, ... |
|
|
2002
|
+
* +------------+ +------------------------------------+
|
|
2003
|
+
*
|
|
2004
|
+
* Data [One of Gauge, Sum, Histogram, Summary, ...]
|
|
2005
|
+
* +-----------+
|
|
2006
|
+
* |... | // Metadata about the Data.
|
|
2007
|
+
* |points |--+
|
|
2008
|
+
* +-----------+ |
|
|
2009
|
+
* | +---------------------------+
|
|
2010
|
+
* | |DataPoint 1 |
|
|
2011
|
+
* v |+------+------+ +------+ |
|
|
2012
|
+
* +-----+ ||label |label |...|label | |
|
|
2013
|
+
* | 1 |-->||value1|value2|...|valueN| |
|
|
2014
|
+
* +-----+ |+------+------+ +------+ |
|
|
2015
|
+
* | . | |+-----+ |
|
|
2016
|
+
* | . | ||value| |
|
|
2017
|
+
* | . | |+-----+ |
|
|
2018
|
+
* | . | +---------------------------+
|
|
2019
|
+
* | . | .
|
|
2020
|
+
* | . | .
|
|
2021
|
+
* | . | .
|
|
2022
|
+
* | . | +---------------------------+
|
|
2023
|
+
* | . | |DataPoint M |
|
|
2024
|
+
* +-----+ |+------+------+ +------+ |
|
|
2025
|
+
* | M |-->||label |label |...|label | |
|
|
2026
|
+
* +-----+ ||value1|value2|...|valueN| |
|
|
2027
|
+
* |+------+------+ +------+ |
|
|
2028
|
+
* |+-----+ |
|
|
2029
|
+
* ||value| |
|
|
2030
|
+
* |+-----+ |
|
|
2031
|
+
* +---------------------------+
|
|
2032
|
+
*
|
|
2033
|
+
* Each distinct type of DataPoint represents the output of a specific
|
|
2034
|
+
* aggregation function, the result of applying the DataPoint's
|
|
2035
|
+
* associated function of to one or more measurements.
|
|
2036
|
+
*
|
|
2037
|
+
* All DataPoint types have three common fields:
|
|
2038
|
+
* - Attributes includes key-value pairs associated with the data point
|
|
2039
|
+
* - TimeUnixNano is required, set to the end time of the aggregation
|
|
2040
|
+
* - StartTimeUnixNano is optional, but strongly encouraged for DataPoints
|
|
2041
|
+
* having an AggregationTemporality field, as discussed below.
|
|
2042
|
+
*
|
|
2043
|
+
* Both TimeUnixNano and StartTimeUnixNano values are expressed as
|
|
2044
|
+
* UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
|
|
2045
|
+
*
|
|
2046
|
+
* # TimeUnixNano
|
|
2047
|
+
*
|
|
2048
|
+
* This field is required, having consistent interpretation across
|
|
2049
|
+
* DataPoint types. TimeUnixNano is the moment corresponding to when
|
|
2050
|
+
* the data point's aggregate value was captured.
|
|
2051
|
+
*
|
|
2052
|
+
* Data points with the 0 value for TimeUnixNano SHOULD be rejected
|
|
2053
|
+
* by consumers.
|
|
2054
|
+
*
|
|
2055
|
+
* # StartTimeUnixNano
|
|
2056
|
+
*
|
|
2057
|
+
* StartTimeUnixNano in general allows detecting when a sequence of
|
|
2058
|
+
* observations is unbroken. This field indicates to consumers the
|
|
2059
|
+
* start time for points with cumulative and delta
|
|
2060
|
+
* AggregationTemporality, and it should be included whenever possible
|
|
2061
|
+
* to support correct rate calculation. Although it may be omitted
|
|
2062
|
+
* when the start time is truly unknown, setting StartTimeUnixNano is
|
|
2063
|
+
* strongly encouraged.
|
|
2064
|
+
*/
|
|
2065
|
+
interface Metric {
|
|
2066
|
+
/** The name of the metric. */
|
|
2067
|
+
name?: string | undefined;
|
|
2068
|
+
/** A description of the metric, which can be used in documentation. */
|
|
2069
|
+
description?: string | undefined;
|
|
2070
|
+
/**
|
|
2071
|
+
* The unit in which the metric value is reported. Follows the format
|
|
2072
|
+
* described by https://unitsofmeasure.org/ucum.html.
|
|
2073
|
+
*/
|
|
2074
|
+
unit?: string | undefined;
|
|
2075
|
+
gauge?: Gauge | undefined;
|
|
2076
|
+
sum?: Sum | undefined;
|
|
2077
|
+
histogram?: Histogram | undefined;
|
|
2078
|
+
exponentialHistogram?: ExponentialHistogram | undefined;
|
|
2079
|
+
summary?: Summary | undefined;
|
|
2080
|
+
/**
|
|
2081
|
+
* Additional metadata attributes that describe the metric. [Optional].
|
|
2082
|
+
* Attributes are non-identifying.
|
|
2083
|
+
* Consumers SHOULD NOT need to be aware of these attributes.
|
|
2084
|
+
* These attributes MAY be used to encode information allowing
|
|
2085
|
+
* for lossless roundtrip translation to / from another data model.
|
|
2086
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
2087
|
+
* attribute with the same key).
|
|
2088
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
2089
|
+
*/
|
|
2090
|
+
metadata?: KeyValue[] | undefined;
|
|
2091
|
+
}
|
|
2092
|
+
/**
|
|
2093
|
+
* Gauge represents the type of a scalar metric that always exports the
|
|
2094
|
+
* "current value" for every data point. It should be used for an "unknown"
|
|
2095
|
+
* aggregation.
|
|
2096
|
+
*
|
|
2097
|
+
* A Gauge does not support different aggregation temporalities. Given the
|
|
2098
|
+
* aggregation is unknown, points cannot be combined using the same
|
|
2099
|
+
* aggregation, regardless of aggregation temporalities. Therefore,
|
|
2100
|
+
* AggregationTemporality is not included. Consequently, this also means
|
|
2101
|
+
* "StartTimeUnixNano" is ignored for all data points.
|
|
2102
|
+
*/
|
|
2103
|
+
interface Gauge {
|
|
2104
|
+
/**
|
|
2105
|
+
* The time series data points.
|
|
2106
|
+
* Note: Multiple time series may be included (same timestamp, different attributes).
|
|
2107
|
+
*/
|
|
2108
|
+
dataPoints?: NumberDataPoint[] | undefined;
|
|
2109
|
+
}
|
|
2110
|
+
/**
|
|
2111
|
+
* Sum represents the type of a scalar metric that is calculated as a sum of all
|
|
2112
|
+
* reported measurements over a time interval.
|
|
2113
|
+
*/
|
|
2114
|
+
interface Sum {
|
|
2115
|
+
/**
|
|
2116
|
+
* The time series data points.
|
|
2117
|
+
* Note: Multiple time series may be included (same timestamp, different attributes).
|
|
2118
|
+
*/
|
|
2119
|
+
dataPoints?: NumberDataPoint[] | undefined;
|
|
2120
|
+
/**
|
|
2121
|
+
* aggregation_temporality describes if the aggregator reports delta changes
|
|
2122
|
+
* since last report time, or cumulative changes since a fixed start time.
|
|
2123
|
+
*/
|
|
2124
|
+
aggregationTemporality?: AggregationTemporality | undefined;
|
|
2125
|
+
/** Represents whether the sum is monotonic. */
|
|
2126
|
+
isMonotonic?: boolean | undefined;
|
|
2127
|
+
}
|
|
2128
|
+
/**
|
|
2129
|
+
* Histogram represents the type of a metric that is calculated by aggregating
|
|
2130
|
+
* as a Histogram of all reported measurements over a time interval.
|
|
2131
|
+
*/
|
|
2132
|
+
interface Histogram {
|
|
2133
|
+
/**
|
|
2134
|
+
* The time series data points.
|
|
2135
|
+
* Note: Multiple time series may be included (same timestamp, different attributes).
|
|
2136
|
+
*/
|
|
2137
|
+
dataPoints?: HistogramDataPoint[] | undefined;
|
|
2138
|
+
/**
|
|
2139
|
+
* aggregation_temporality describes if the aggregator reports delta changes
|
|
2140
|
+
* since last report time, or cumulative changes since a fixed start time.
|
|
2141
|
+
*/
|
|
2142
|
+
aggregationTemporality?: AggregationTemporality | undefined;
|
|
2143
|
+
}
|
|
2144
|
+
/**
|
|
2145
|
+
* ExponentialHistogram represents the type of a metric that is calculated by aggregating
|
|
2146
|
+
* as a ExponentialHistogram of all reported double measurements over a time interval.
|
|
2147
|
+
*/
|
|
2148
|
+
interface ExponentialHistogram {
|
|
2149
|
+
/**
|
|
2150
|
+
* The time series data points.
|
|
2151
|
+
* Note: Multiple time series may be included (same timestamp, different attributes).
|
|
2152
|
+
*/
|
|
2153
|
+
dataPoints?: ExponentialHistogramDataPoint[] | undefined;
|
|
2154
|
+
/**
|
|
2155
|
+
* aggregation_temporality describes if the aggregator reports delta changes
|
|
2156
|
+
* since last report time, or cumulative changes since a fixed start time.
|
|
2157
|
+
*/
|
|
2158
|
+
aggregationTemporality?: AggregationTemporality | undefined;
|
|
2159
|
+
}
|
|
2160
|
+
/**
|
|
2161
|
+
* Summary metric data are used to convey quantile summaries,
|
|
2162
|
+
* a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary)
|
|
2163
|
+
* and OpenMetrics (see: https://github.com/prometheus/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45)
|
|
2164
|
+
* data type. These data points cannot always be merged in a meaningful way.
|
|
2165
|
+
* While they can be useful in some applications, histogram data points are
|
|
2166
|
+
* recommended for new applications.
|
|
2167
|
+
* Summary metrics do not have an aggregation temporality field. This is
|
|
2168
|
+
* because the count and sum fields of a SummaryDataPoint are assumed to be
|
|
2169
|
+
* cumulative values.
|
|
2170
|
+
*/
|
|
2171
|
+
interface Summary {
|
|
2172
|
+
/**
|
|
2173
|
+
* The time series data points.
|
|
2174
|
+
* Note: Multiple time series may be included (same timestamp, different attributes).
|
|
2175
|
+
*/
|
|
2176
|
+
dataPoints?: SummaryDataPoint[] | undefined;
|
|
2177
|
+
}
|
|
2178
|
+
/**
|
|
2179
|
+
* NumberDataPoint is a single data point in a timeseries that describes the
|
|
2180
|
+
* time-varying scalar value of a metric.
|
|
2181
|
+
*/
|
|
2182
|
+
interface NumberDataPoint {
|
|
2183
|
+
/**
|
|
2184
|
+
* The set of key/value pairs that uniquely identify the timeseries from
|
|
2185
|
+
* where this point belongs. The list may be empty (may contain 0 elements).
|
|
2186
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
2187
|
+
* attribute with the same key).
|
|
2188
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
2189
|
+
*/
|
|
2190
|
+
attributes?: KeyValue[] | undefined;
|
|
2191
|
+
/**
|
|
2192
|
+
* StartTimeUnixNano is optional but strongly encouraged, see the
|
|
2193
|
+
* the detailed comments above Metric.
|
|
2194
|
+
*
|
|
2195
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
2196
|
+
* 1970.
|
|
2197
|
+
*/
|
|
2198
|
+
startTimeUnixNano?: string | undefined;
|
|
2199
|
+
/**
|
|
2200
|
+
* TimeUnixNano is required, see the detailed comments above Metric.
|
|
2201
|
+
*
|
|
2202
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
2203
|
+
* 1970.
|
|
2204
|
+
*/
|
|
2205
|
+
timeUnixNano?: string | undefined;
|
|
2206
|
+
asDouble?: number | undefined;
|
|
2207
|
+
asInt?: string | undefined;
|
|
2208
|
+
/**
|
|
2209
|
+
* (Optional) List of exemplars collected from
|
|
2210
|
+
* measurements that were used to form the data point
|
|
2211
|
+
*/
|
|
2212
|
+
exemplars?: Exemplar[] | undefined;
|
|
2213
|
+
/**
|
|
2214
|
+
* Flags that apply to this specific data point. See DataPointFlags
|
|
2215
|
+
* for the available flags and their meaning.
|
|
2216
|
+
*/
|
|
2217
|
+
flags?: number | undefined;
|
|
2218
|
+
}
|
|
2219
|
+
/**
|
|
2220
|
+
* HistogramDataPoint is a single data point in a timeseries that describes the
|
|
2221
|
+
* time-varying values of a Histogram. A Histogram contains summary statistics
|
|
2222
|
+
* for a population of values, it may optionally contain the distribution of
|
|
2223
|
+
* those values across a set of buckets.
|
|
2224
|
+
*
|
|
2225
|
+
* If the histogram contains the distribution of values, then both
|
|
2226
|
+
* "explicit_bounds" and "bucket counts" fields must be defined.
|
|
2227
|
+
* If the histogram does not contain the distribution of values, then both
|
|
2228
|
+
* "explicit_bounds" and "bucket_counts" must be omitted and only "count" and
|
|
2229
|
+
* "sum" are known.
|
|
2230
|
+
*/
|
|
2231
|
+
interface HistogramDataPoint {
|
|
2232
|
+
/**
|
|
2233
|
+
* The set of key/value pairs that uniquely identify the timeseries from
|
|
2234
|
+
* where this point belongs. The list may be empty (may contain 0 elements).
|
|
2235
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
2236
|
+
* attribute with the same key).
|
|
2237
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
2238
|
+
*/
|
|
2239
|
+
attributes?: KeyValue[] | undefined;
|
|
2240
|
+
/**
|
|
2241
|
+
* StartTimeUnixNano is optional but strongly encouraged, see the
|
|
2242
|
+
* the detailed comments above Metric.
|
|
2243
|
+
*
|
|
2244
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
2245
|
+
* 1970.
|
|
2246
|
+
*/
|
|
2247
|
+
startTimeUnixNano?: string | undefined;
|
|
2248
|
+
/**
|
|
2249
|
+
* TimeUnixNano is required, see the detailed comments above Metric.
|
|
2250
|
+
*
|
|
2251
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
2252
|
+
* 1970.
|
|
2253
|
+
*/
|
|
2254
|
+
timeUnixNano?: string | undefined;
|
|
2255
|
+
/**
|
|
2256
|
+
* count is the number of values in the population. Must be non-negative. This
|
|
2257
|
+
* value must be equal to the sum of the "count" fields in buckets if a
|
|
2258
|
+
* histogram is provided.
|
|
2259
|
+
*/
|
|
2260
|
+
count?: string | number | undefined;
|
|
2261
|
+
/**
|
|
2262
|
+
* sum of the values in the population. If count is zero then this field
|
|
2263
|
+
* must be zero.
|
|
2264
|
+
*
|
|
2265
|
+
* Note: Sum should only be filled out when measuring non-negative discrete
|
|
2266
|
+
* events, and is assumed to be monotonic over the values of these events.
|
|
2267
|
+
* Negative events *can* be recorded, but sum should not be filled out when
|
|
2268
|
+
* doing so. This is specifically to enforce compatibility w/ OpenMetrics,
|
|
2269
|
+
* see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram
|
|
2270
|
+
*/
|
|
2271
|
+
sum?: number | undefined;
|
|
2272
|
+
/**
|
|
2273
|
+
* bucket_counts is an optional field contains the count values of histogram
|
|
2274
|
+
* for each bucket.
|
|
2275
|
+
*
|
|
2276
|
+
* The sum of the bucket_counts must equal the value in the count field.
|
|
2277
|
+
*
|
|
2278
|
+
* The number of elements in bucket_counts array must be by one greater than
|
|
2279
|
+
* the number of elements in explicit_bounds array. The exception to this rule
|
|
2280
|
+
* is when the length of bucket_counts is 0, then the length of explicit_bounds
|
|
2281
|
+
* must also be 0.
|
|
2282
|
+
*/
|
|
2283
|
+
bucketCounts?: (string | number)[] | undefined;
|
|
2284
|
+
/**
|
|
2285
|
+
* explicit_bounds specifies buckets with explicitly defined bounds for values.
|
|
2286
|
+
*
|
|
2287
|
+
* The boundaries for bucket at index i are:
|
|
2288
|
+
*
|
|
2289
|
+
* (-infinity, explicit_bounds[i]] for i == 0
|
|
2290
|
+
* (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
|
|
2291
|
+
* (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
|
|
2292
|
+
*
|
|
2293
|
+
* The values in the explicit_bounds array must be strictly increasing.
|
|
2294
|
+
*
|
|
2295
|
+
* Histogram buckets are inclusive of their upper boundary, except the last
|
|
2296
|
+
* bucket where the boundary is at infinity. This format is intentionally
|
|
2297
|
+
* compatible with the OpenMetrics histogram definition.
|
|
2298
|
+
*
|
|
2299
|
+
* If bucket_counts length is 0 then explicit_bounds length must also be 0,
|
|
2300
|
+
* otherwise the data point is invalid.
|
|
2301
|
+
*/
|
|
2302
|
+
explicitBounds?: number[] | undefined;
|
|
2303
|
+
/**
|
|
2304
|
+
* (Optional) List of exemplars collected from
|
|
2305
|
+
* measurements that were used to form the data point
|
|
2306
|
+
*/
|
|
2307
|
+
exemplars?: Exemplar[] | undefined;
|
|
2308
|
+
/**
|
|
2309
|
+
* Flags that apply to this specific data point. See DataPointFlags
|
|
2310
|
+
* for the available flags and their meaning.
|
|
2311
|
+
*/
|
|
2312
|
+
flags?: number | undefined;
|
|
2313
|
+
/** min is the minimum value over (start_time, end_time]. */
|
|
2314
|
+
min?: number | undefined;
|
|
2315
|
+
/** max is the maximum value over (start_time, end_time]. */
|
|
2316
|
+
max?: number | undefined;
|
|
2317
|
+
}
|
|
2318
|
+
/**
|
|
2319
|
+
* ExponentialHistogramDataPoint is a single data point in a timeseries that describes the
|
|
2320
|
+
* time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains
|
|
2321
|
+
* summary statistics for a population of values, it may optionally contain the
|
|
2322
|
+
* distribution of those values across a set of buckets.
|
|
2323
|
+
*/
|
|
2324
|
+
interface ExponentialHistogramDataPoint {
|
|
2325
|
+
/**
|
|
2326
|
+
* The set of key/value pairs that uniquely identify the timeseries from
|
|
2327
|
+
* where this point belongs. The list may be empty (may contain 0 elements).
|
|
2328
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
2329
|
+
* attribute with the same key).
|
|
2330
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
2331
|
+
*/
|
|
2332
|
+
attributes?: KeyValue[] | undefined;
|
|
2333
|
+
/**
|
|
2334
|
+
* StartTimeUnixNano is optional but strongly encouraged, see the
|
|
2335
|
+
* the detailed comments above Metric.
|
|
2336
|
+
*
|
|
2337
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
2338
|
+
* 1970.
|
|
2339
|
+
*/
|
|
2340
|
+
startTimeUnixNano?: string | undefined;
|
|
2341
|
+
/**
|
|
2342
|
+
* TimeUnixNano is required, see the detailed comments above Metric.
|
|
2343
|
+
*
|
|
2344
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
2345
|
+
* 1970.
|
|
2346
|
+
*/
|
|
2347
|
+
timeUnixNano?: string | undefined;
|
|
2348
|
+
/**
|
|
2349
|
+
* The number of values in the population. Must be
|
|
2350
|
+
* non-negative. This value must be equal to the sum of the "bucket_counts"
|
|
2351
|
+
* values in the positive and negative Buckets plus the "zero_count" field.
|
|
2352
|
+
*/
|
|
2353
|
+
count?: string | number | undefined;
|
|
2354
|
+
/**
|
|
2355
|
+
* The sum of the values in the population. If count is zero then this field
|
|
2356
|
+
* must be zero.
|
|
2357
|
+
*
|
|
2358
|
+
* Note: Sum should only be filled out when measuring non-negative discrete
|
|
2359
|
+
* events, and is assumed to be monotonic over the values of these events.
|
|
2360
|
+
* Negative events *can* be recorded, but sum should not be filled out when
|
|
2361
|
+
* doing so. This is specifically to enforce compatibility w/ OpenMetrics,
|
|
2362
|
+
* see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram
|
|
2363
|
+
*/
|
|
2364
|
+
sum?: number | undefined;
|
|
2365
|
+
/**
|
|
2366
|
+
* scale describes the resolution of the histogram. Boundaries are
|
|
2367
|
+
* located at powers of the base, where:
|
|
2368
|
+
*
|
|
2369
|
+
* base = (2^(2^-scale))
|
|
2370
|
+
*
|
|
2371
|
+
* The histogram bucket identified by `index`, a signed integer,
|
|
2372
|
+
* contains values that are greater than (base^index) and
|
|
2373
|
+
* less than or equal to (base^(index+1)).
|
|
2374
|
+
*
|
|
2375
|
+
* The positive and negative ranges of the histogram are expressed
|
|
2376
|
+
* separately. Negative values are mapped by their absolute value
|
|
2377
|
+
* into the negative range using the same scale as the positive range.
|
|
2378
|
+
*
|
|
2379
|
+
* scale is not restricted by the protocol, as the permissible
|
|
2380
|
+
* values depend on the range of the data.
|
|
2381
|
+
*/
|
|
2382
|
+
scale?: number | undefined;
|
|
2383
|
+
/**
|
|
2384
|
+
* The count of values that are either exactly zero or
|
|
2385
|
+
* within the region considered zero by the instrumentation at the
|
|
2386
|
+
* tolerated degree of precision. This bucket stores values that
|
|
2387
|
+
* cannot be expressed using the standard exponential formula as
|
|
2388
|
+
* well as values that have been rounded to zero.
|
|
2389
|
+
*
|
|
2390
|
+
* Implementations MAY consider the zero bucket to have probability
|
|
2391
|
+
* mass equal to (zero_count / count).
|
|
2392
|
+
*/
|
|
2393
|
+
zeroCount?: string | number | undefined;
|
|
2394
|
+
/** positive carries the positive range of exponential bucket counts. */
|
|
2395
|
+
positive?: ExponentialHistogramDataPoint_Buckets | undefined;
|
|
2396
|
+
/** negative carries the negative range of exponential bucket counts. */
|
|
2397
|
+
negative?: ExponentialHistogramDataPoint_Buckets | undefined;
|
|
2398
|
+
/**
|
|
2399
|
+
* Flags that apply to this specific data point. See DataPointFlags
|
|
2400
|
+
* for the available flags and their meaning.
|
|
2401
|
+
*/
|
|
2402
|
+
flags?: number | undefined;
|
|
2403
|
+
/**
|
|
2404
|
+
* (Optional) List of exemplars collected from
|
|
2405
|
+
* measurements that were used to form the data point
|
|
2406
|
+
*/
|
|
2407
|
+
exemplars?: Exemplar[] | undefined;
|
|
2408
|
+
/** The minimum value over (start_time, end_time]. */
|
|
2409
|
+
min?: number | undefined;
|
|
2410
|
+
/** The maximum value over (start_time, end_time]. */
|
|
2411
|
+
max?: number | undefined;
|
|
2412
|
+
/**
|
|
2413
|
+
* ZeroThreshold may be optionally set to convey the width of the zero
|
|
2414
|
+
* region. Where the zero region is defined as the closed interval
|
|
2415
|
+
* [-ZeroThreshold, ZeroThreshold].
|
|
2416
|
+
* When ZeroThreshold is 0, zero count bucket stores values that cannot be
|
|
2417
|
+
* expressed using the standard exponential formula as well as values that
|
|
2418
|
+
* have been rounded to zero.
|
|
2419
|
+
*/
|
|
2420
|
+
zeroThreshold?: number | undefined;
|
|
2421
|
+
}
|
|
2422
|
+
/**
|
|
2423
|
+
* Buckets are a set of bucket counts, encoded in a contiguous array
|
|
2424
|
+
* of counts.
|
|
2425
|
+
*/
|
|
2426
|
+
interface ExponentialHistogramDataPoint_Buckets {
|
|
2427
|
+
/**
|
|
2428
|
+
* The bucket index of the first entry in the bucket_counts array.
|
|
2429
|
+
*
|
|
2430
|
+
* Note: This uses a varint encoding as a simple form of compression.
|
|
2431
|
+
*/
|
|
2432
|
+
offset?: number | undefined;
|
|
2433
|
+
/**
|
|
2434
|
+
* An array of count values, where bucket_counts[i] carries
|
|
2435
|
+
* the count of the bucket at index (offset+i). bucket_counts[i] is the count
|
|
2436
|
+
* of values greater than base^(offset+i) and less than or equal to
|
|
2437
|
+
* base^(offset+i+1).
|
|
2438
|
+
*
|
|
2439
|
+
* Note: By contrast, the explicit HistogramDataPoint uses
|
|
2440
|
+
* fixed64. This field is expected to have many buckets,
|
|
2441
|
+
* especially zeros, so uint64 has been selected to ensure
|
|
2442
|
+
* varint encoding.
|
|
2443
|
+
*/
|
|
2444
|
+
bucketCounts?: (string | number)[] | undefined;
|
|
2445
|
+
}
|
|
2446
|
+
/**
|
|
2447
|
+
* SummaryDataPoint is a single data point in a timeseries that describes the
|
|
2448
|
+
* time-varying values of a Summary metric. The count and sum fields represent
|
|
2449
|
+
* cumulative values.
|
|
2450
|
+
*/
|
|
2451
|
+
interface SummaryDataPoint {
|
|
2452
|
+
/**
|
|
2453
|
+
* The set of key/value pairs that uniquely identify the timeseries from
|
|
2454
|
+
* where this point belongs. The list may be empty (may contain 0 elements).
|
|
2455
|
+
* Attribute keys MUST be unique (it is not allowed to have more than one
|
|
2456
|
+
* attribute with the same key).
|
|
2457
|
+
* The behavior of software that receives duplicated keys can be unpredictable.
|
|
2458
|
+
*/
|
|
2459
|
+
attributes?: KeyValue[] | undefined;
|
|
2460
|
+
/**
|
|
2461
|
+
* StartTimeUnixNano is optional but strongly encouraged, see the
|
|
2462
|
+
* the detailed comments above Metric.
|
|
2463
|
+
*
|
|
2464
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
2465
|
+
* 1970.
|
|
2466
|
+
*/
|
|
2467
|
+
startTimeUnixNano?: string | undefined;
|
|
2468
|
+
/**
|
|
2469
|
+
* TimeUnixNano is required, see the detailed comments above Metric.
|
|
2470
|
+
*
|
|
2471
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
2472
|
+
* 1970.
|
|
2473
|
+
*/
|
|
2474
|
+
timeUnixNano?: string | undefined;
|
|
2475
|
+
/** count is the number of values in the population. Must be non-negative. */
|
|
2476
|
+
count?: string | number | undefined;
|
|
2477
|
+
/**
|
|
2478
|
+
* sum of the values in the population. If count is zero then this field
|
|
2479
|
+
* must be zero.
|
|
2480
|
+
*
|
|
2481
|
+
* Note: Sum should only be filled out when measuring non-negative discrete
|
|
2482
|
+
* events, and is assumed to be monotonic over the values of these events.
|
|
2483
|
+
* Negative events *can* be recorded, but sum should not be filled out when
|
|
2484
|
+
* doing so. This is specifically to enforce compatibility w/ OpenMetrics,
|
|
2485
|
+
* see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#summary
|
|
2486
|
+
*/
|
|
2487
|
+
sum?: number | undefined;
|
|
2488
|
+
/**
|
|
2489
|
+
* (Optional) list of values at different quantiles of the distribution calculated
|
|
2490
|
+
* from the current snapshot. The quantiles must be strictly increasing.
|
|
2491
|
+
*/
|
|
2492
|
+
quantileValues?: SummaryDataPoint_ValueAtQuantile[] | undefined;
|
|
2493
|
+
/**
|
|
2494
|
+
* Flags that apply to this specific data point. See DataPointFlags
|
|
2495
|
+
* for the available flags and their meaning.
|
|
2496
|
+
*/
|
|
2497
|
+
flags?: number | undefined;
|
|
2498
|
+
}
|
|
2499
|
+
/**
|
|
2500
|
+
* Represents the value at a given quantile of a distribution.
|
|
2501
|
+
*
|
|
2502
|
+
* To record Min and Max values following conventions are used:
|
|
2503
|
+
* - The 1.0 quantile is equivalent to the maximum value observed.
|
|
2504
|
+
* - The 0.0 quantile is equivalent to the minimum value observed.
|
|
2505
|
+
*
|
|
2506
|
+
* See the following issue for more context:
|
|
2507
|
+
* https://github.com/open-telemetry/opentelemetry-proto/issues/125
|
|
2508
|
+
*/
|
|
2509
|
+
interface SummaryDataPoint_ValueAtQuantile {
|
|
2510
|
+
/**
|
|
2511
|
+
* The quantile of a distribution. Must be in the interval
|
|
2512
|
+
* [0.0, 1.0].
|
|
2513
|
+
*/
|
|
2514
|
+
quantile?: number | undefined;
|
|
2515
|
+
/**
|
|
2516
|
+
* The value at the given quantile of a distribution.
|
|
2517
|
+
*
|
|
2518
|
+
* Quantile values must NOT be negative.
|
|
2519
|
+
*/
|
|
2520
|
+
value?: number | undefined;
|
|
2521
|
+
}
|
|
2522
|
+
/**
|
|
2523
|
+
* A representation of an exemplar, which is a sample input measurement.
|
|
2524
|
+
* Exemplars also hold information about the environment when the measurement
|
|
2525
|
+
* was recorded, for example the span and trace ID of the active span when the
|
|
2526
|
+
* exemplar was recorded.
|
|
2527
|
+
*/
|
|
2528
|
+
interface Exemplar {
|
|
2529
|
+
/**
|
|
2530
|
+
* The set of key/value pairs that were filtered out by the aggregator, but
|
|
2531
|
+
* recorded alongside the original measurement. Only key/value pairs that were
|
|
2532
|
+
* filtered out by the aggregator should be included
|
|
2533
|
+
*/
|
|
2534
|
+
filteredAttributes?: KeyValue[] | undefined;
|
|
2535
|
+
/**
|
|
2536
|
+
* time_unix_nano is the exact time when this exemplar was recorded
|
|
2537
|
+
*
|
|
2538
|
+
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
|
|
2539
|
+
* 1970.
|
|
2540
|
+
*/
|
|
2541
|
+
timeUnixNano?: string | undefined;
|
|
2542
|
+
asDouble?: number | undefined;
|
|
2543
|
+
asInt?: string | undefined;
|
|
2544
|
+
/**
|
|
2545
|
+
* (Optional) Span ID of the exemplar trace.
|
|
2546
|
+
* span_id may be missing if the measurement is not recorded inside a trace
|
|
2547
|
+
* or if the trace is not sampled.
|
|
2548
|
+
*/
|
|
2549
|
+
spanId?: string | undefined;
|
|
2550
|
+
/**
|
|
2551
|
+
* (Optional) Trace ID of the exemplar trace.
|
|
2552
|
+
* trace_id may be missing if the measurement is not recorded inside a trace
|
|
2553
|
+
* or if the trace is not sampled.
|
|
2554
|
+
*/
|
|
2555
|
+
traceId?: Uint8Array | undefined;
|
|
2556
|
+
}
|
|
2557
|
+
declare namespace telemetry_datasource_d_exports {
|
|
2558
|
+
export { DiscoveredMetric, DiscoveredMetricAttributes, LogsData, LogsPartialSuccess, MetricType, MetricsData, MetricsDiscoveryResult, MetricsPartialSuccess, ReadLogsDatasource, ReadMetricsDatasource, ReadTelemetryDatasource, ReadTracesDatasource, TelemetryDatasource, TracesData, TracesPartialSuccess, WriteLogsDatasource, WriteMetricsDatasource, WriteTelemetryDatasource, WriteTracesDatasource };
|
|
2559
|
+
}
|
|
2560
|
+
interface MetricsPartialSuccess {
|
|
2561
|
+
rejectedDataPoints?: string;
|
|
2562
|
+
errorMessage?: string;
|
|
2563
|
+
}
|
|
2564
|
+
interface WriteMetricsDatasource {
|
|
2565
|
+
writeMetrics(metricsData: MetricsData$1): Promise<MetricsPartialSuccess>;
|
|
2566
|
+
}
|
|
2567
|
+
interface TracesPartialSuccess {
|
|
2568
|
+
rejectedSpans?: string;
|
|
2569
|
+
errorMessage?: string;
|
|
2570
|
+
}
|
|
2571
|
+
interface WriteTracesDatasource {
|
|
2572
|
+
writeTraces(tracesData: TracesData): Promise<TracesPartialSuccess>;
|
|
2573
|
+
}
|
|
2574
|
+
interface ReadTracesDatasource {
|
|
2575
|
+
getTraces(filter: z$1.infer<typeof tracesDataFilterSchema>): Promise<{
|
|
2576
|
+
data: z$1.infer<typeof otelTracesSchema>[];
|
|
2577
|
+
nextCursor: string | null;
|
|
2578
|
+
}>;
|
|
2579
|
+
}
|
|
2580
|
+
interface ReadLogsDatasource {
|
|
2581
|
+
getLogs(filter: z$1.infer<typeof logsDataFilterSchema>): Promise<{
|
|
2582
|
+
data: z$1.infer<typeof otelLogsSchema>[];
|
|
2583
|
+
nextCursor: string | null;
|
|
2584
|
+
}>;
|
|
2585
|
+
}
|
|
2586
|
+
type MetricType = "Gauge" | "Sum" | "Histogram" | "ExponentialHistogram" | "Summary";
|
|
2587
|
+
interface DiscoveredMetricAttributes {
|
|
2588
|
+
values: Record<string, string[]>;
|
|
2589
|
+
_truncated?: boolean;
|
|
2590
|
+
}
|
|
2591
|
+
interface DiscoveredMetric {
|
|
2592
|
+
name: string;
|
|
2593
|
+
type: MetricType;
|
|
2594
|
+
unit?: string;
|
|
2595
|
+
description?: string;
|
|
2596
|
+
attributes: DiscoveredMetricAttributes;
|
|
2597
|
+
resourceAttributes: DiscoveredMetricAttributes;
|
|
2598
|
+
}
|
|
2599
|
+
interface MetricsDiscoveryResult {
|
|
2600
|
+
metrics: DiscoveredMetric[];
|
|
2601
|
+
}
|
|
2602
|
+
interface ReadMetricsDatasource {
|
|
2603
|
+
getMetrics(filter: z$1.infer<typeof metricsDataFilterSchema>): Promise<{
|
|
2604
|
+
data: z$1.infer<typeof otelMetricsSchema>[];
|
|
2605
|
+
nextCursor: string | null;
|
|
2606
|
+
}>;
|
|
2607
|
+
discoverMetrics(): Promise<MetricsDiscoveryResult>;
|
|
2608
|
+
}
|
|
2609
|
+
interface LogsPartialSuccess {
|
|
2610
|
+
rejectedLogRecords?: string;
|
|
2611
|
+
errorMessage?: string;
|
|
2612
|
+
}
|
|
2613
|
+
interface WriteLogsDatasource {
|
|
2614
|
+
writeLogs(logsData: LogsData): Promise<LogsPartialSuccess>;
|
|
2615
|
+
}
|
|
2616
|
+
type ReadTelemetryDatasource = ReadTracesDatasource & ReadLogsDatasource & ReadMetricsDatasource;
|
|
2617
|
+
type WriteTelemetryDatasource = WriteMetricsDatasource & WriteTracesDatasource & WriteLogsDatasource;
|
|
2618
|
+
type TelemetryDatasource = WriteTelemetryDatasource & ReadTelemetryDatasource;
|
|
2619
|
+
declare namespace otlp_zod_d_exports {
|
|
2620
|
+
export { aggregationTemporalitySchema, anyValueSchema, arrayValueSchema, dataPointFlagsSchema, entityRefSchema, exponentialHistogramDataPointBucketsSchema$1 as exponentialHistogramDataPointBucketsSchema, instrumentationScopeSchema, keyValueListSchema, keyValueSchema, logRecordFlagsSchema, logRecordSchema, logsDataSchema, resourceLogsSchema, resourceSchema, resourceSpansSchema, scopeLogsSchema, scopeSpansSchema, severityNumberSchema, spanEventSchema, spanFlagsSchema, spanKindSchema, spanLinkSchema, spanSchema, statusCodeSchema, statusSchema, summaryDataPointSchema$1 as summaryDataPointSchema, summaryDataPointValueAtQuantileSchema$1 as summaryDataPointValueAtQuantileSchema, summarySchema$1 as summarySchema, tracesDataSchema };
|
|
2621
|
+
}
|
|
2622
|
+
declare const entityRefSchema: z.ZodObject<{
|
|
2623
|
+
schemaUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
2624
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
2625
|
+
idKeys: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodUndefined]>>;
|
|
2626
|
+
descriptionKeys: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodUndefined]>>;
|
|
2627
|
+
}, z.core.$strip>;
|
|
2628
|
+
declare const spanFlagsSchema: z.ZodEnum<typeof SpanFlags>;
|
|
2629
|
+
declare const spanKindSchema: z.ZodEnum<typeof SpanKind>;
|
|
2630
|
+
declare const statusCodeSchema: z.ZodEnum<typeof StatusCode>;
|
|
2631
|
+
declare const severityNumberSchema: z.ZodEnum<typeof SeverityNumber>;
|
|
2632
|
+
declare const logRecordFlagsSchema: z.ZodEnum<typeof LogRecordFlags>;
|
|
2633
|
+
declare const aggregationTemporalitySchema: z.ZodUnion<readonly [z.ZodEnum<typeof AggregationTemporality>, z.ZodNumber]>;
|
|
2634
|
+
declare const dataPointFlagsSchema: z.ZodUnion<readonly [z.ZodEnum<typeof DataPointFlags>, z.ZodNumber]>;
|
|
2635
|
+
declare const exponentialHistogramDataPointBucketsSchema$1: z.ZodObject<{
|
|
2636
|
+
offset: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodUndefined]>>;
|
|
2637
|
+
bucketCounts: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodUndefined]>>;
|
|
2638
|
+
}, z.core.$strip>;
|
|
2639
|
+
declare const summaryDataPointValueAtQuantileSchema$1: z.ZodObject<{
|
|
2640
|
+
quantile: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodUndefined]>>;
|
|
2641
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodUndefined]>>;
|
|
2642
|
+
}, z.core.$strip>;
|
|
2643
|
+
declare const statusSchema: z.ZodObject<{
|
|
2644
|
+
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>>;
|
|
2645
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<typeof StatusCode>, z.ZodUndefined]>>;
|
|
2646
|
+
}, z.core.$strip>;
|
|
2647
|
+
declare const anyValueSchema: z.ZodSchema<AnyValue>;
|
|
2648
|
+
declare const arrayValueSchema: z.ZodSchema<ArrayValue>;
|
|
2649
|
+
declare const keyValueListSchema: z.ZodSchema<KeyValueList>;
|
|
2650
|
+
declare const keyValueSchema: z.ZodSchema<KeyValue>;
|
|
2651
|
+
declare const instrumentationScopeSchema: z.ZodSchema<InstrumentationScope>;
|
|
2652
|
+
declare const resourceSchema: z.ZodSchema<Resource>;
|
|
2653
|
+
declare const tracesDataSchema: z.ZodSchema<TracesData>;
|
|
2654
|
+
declare const resourceSpansSchema: z.ZodSchema<ResourceSpans>;
|
|
2655
|
+
declare const scopeSpansSchema: z.ZodSchema<ScopeSpans>;
|
|
2656
|
+
declare const spanSchema: z.ZodSchema<Span>;
|
|
2657
|
+
declare const spanEventSchema: z.ZodSchema<Span_Event>;
|
|
2658
|
+
declare const spanLinkSchema: z.ZodSchema<Span_Link>;
|
|
2659
|
+
declare const logsDataSchema: z.ZodSchema<LogsData>;
|
|
2660
|
+
declare const resourceLogsSchema: z.ZodSchema<ResourceLogs>;
|
|
2661
|
+
declare const scopeLogsSchema: z.ZodSchema<ScopeLogs>;
|
|
2662
|
+
declare const logRecordSchema: z.ZodSchema<LogRecord>;
|
|
2663
|
+
declare const summarySchema$1: z.ZodSchema<Summary$1>;
|
|
2664
|
+
declare const summaryDataPointSchema$1: z.ZodSchema<SummaryDataPoint$1>;
|
|
2665
|
+
declare namespace otlp_metrics_zod_d_exports {
|
|
2666
|
+
export { exemplarSchema, exponentialHistogramDataPointBucketsSchema, exponentialHistogramDataPointSchema, exponentialHistogramSchema, gaugeSchema, histogramDataPointSchema, histogramSchema, metricSchema, metricsDataSchema, numberDataPointSchema, resourceMetricsSchema, scopeMetricsSchema, sumSchema, summaryDataPointSchema, summaryDataPointValueAtQuantileSchema, summarySchema };
|
|
2667
|
+
}
|
|
2668
|
+
/**
|
|
2669
|
+
* Represents the value at a given quantile of a distribution.
|
|
2670
|
+
*
|
|
2671
|
+
* To record Min and Max values following conventions are used:
|
|
2672
|
+
* - The 1.0 quantile is equivalent to the maximum value observed.
|
|
2673
|
+
* - The 0.0 quantile is equivalent to the minimum value observed.
|
|
2674
|
+
*
|
|
2675
|
+
* See the following issue for more context:
|
|
2676
|
+
* https://github.com/open-telemetry/opentelemetry-proto/issues/125
|
|
2677
|
+
*/
|
|
2678
|
+
declare const summaryDataPointValueAtQuantileSchema: z.ZodSchema<SummaryDataPoint_ValueAtQuantile>;
|
|
2679
|
+
/**
|
|
2680
|
+
* Buckets are a set of bucket counts, encoded in a contiguous array
|
|
2681
|
+
* of counts.
|
|
2682
|
+
*/
|
|
2683
|
+
declare const exponentialHistogramDataPointBucketsSchema: z.ZodSchema<ExponentialHistogramDataPoint_Buckets>;
|
|
2684
|
+
/**
|
|
2685
|
+
* A representation of an exemplar, which is a sample input measurement.
|
|
2686
|
+
* Exemplars also hold information about the environment when the measurement
|
|
2687
|
+
* was recorded, for example the span and trace ID of the active span when the
|
|
2688
|
+
* exemplar was recorded.
|
|
2689
|
+
*/
|
|
2690
|
+
declare const exemplarSchema: z.ZodSchema<Exemplar>;
|
|
2691
|
+
/**
|
|
2692
|
+
* NumberDataPoint is a single data point in a timeseries that describes the
|
|
2693
|
+
* time-varying scalar value of a metric.
|
|
2694
|
+
*/
|
|
2695
|
+
declare const numberDataPointSchema: z.ZodSchema<NumberDataPoint>;
|
|
2696
|
+
/**
|
|
2697
|
+
* HistogramDataPoint is a single data point in a timeseries that describes the
|
|
2698
|
+
* time-varying values of a Histogram. A Histogram contains summary statistics
|
|
2699
|
+
* for a population of values, it may optionally contain the distribution of
|
|
2700
|
+
* those values across a set of buckets.
|
|
2701
|
+
*
|
|
2702
|
+
* If the histogram contains the distribution of values, then both
|
|
2703
|
+
* "explicit_bounds" and "bucket counts" fields must be defined.
|
|
2704
|
+
* If the histogram does not contain the distribution of values, then both
|
|
2705
|
+
* "explicit_bounds" and "bucket_counts" must be omitted and only "count" and
|
|
2706
|
+
* "sum" are known.
|
|
2707
|
+
*/
|
|
2708
|
+
declare const histogramDataPointSchema: z.ZodSchema<HistogramDataPoint>;
|
|
2709
|
+
/**
|
|
2710
|
+
* ExponentialHistogramDataPoint is a single data point in a timeseries that describes the
|
|
2711
|
+
* time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains
|
|
2712
|
+
* summary statistics for a population of values, it may optionally contain the
|
|
2713
|
+
* distribution of those values across a set of buckets.
|
|
2714
|
+
*/
|
|
2715
|
+
declare const exponentialHistogramDataPointSchema: z.ZodSchema<ExponentialHistogramDataPoint>;
|
|
2716
|
+
/**
|
|
2717
|
+
* SummaryDataPoint is a single data point in a timeseries that describes the
|
|
2718
|
+
* time-varying values of a Summary metric. The count and sum fields represent
|
|
2719
|
+
* cumulative values.
|
|
2720
|
+
*/
|
|
2721
|
+
declare const summaryDataPointSchema: z.ZodSchema<SummaryDataPoint>;
|
|
2722
|
+
/**
|
|
2723
|
+
* Gauge represents the type of a scalar metric that always exports the
|
|
2724
|
+
* "current value" for every data point. It should be used for an "unknown"
|
|
2725
|
+
* aggregation.
|
|
2726
|
+
*
|
|
2727
|
+
* A Gauge does not support different aggregation temporalities. Given the
|
|
2728
|
+
* aggregation is unknown, points cannot be combined using the same
|
|
2729
|
+
* aggregation, regardless of aggregation temporalities. Therefore,
|
|
2730
|
+
* AggregationTemporality is not included. Consequently, this also means
|
|
2731
|
+
* "StartTimeUnixNano" is ignored for all data points.
|
|
2732
|
+
*/
|
|
2733
|
+
declare const gaugeSchema: z.ZodSchema<Gauge>;
|
|
2734
|
+
/**
|
|
2735
|
+
* Sum represents the type of a scalar metric that is calculated as a sum of all
|
|
2736
|
+
* reported measurements over a time interval.
|
|
2737
|
+
*/
|
|
2738
|
+
declare const sumSchema: z.ZodSchema<Sum>;
|
|
2739
|
+
/**
|
|
2740
|
+
* Histogram represents the type of a metric that is calculated by aggregating
|
|
2741
|
+
* as a Histogram of all reported measurements over a time interval.
|
|
2742
|
+
*/
|
|
2743
|
+
declare const histogramSchema: z.ZodSchema<Histogram>;
|
|
2744
|
+
/**
|
|
2745
|
+
* ExponentialHistogram represents the type of a metric that is calculated by aggregating
|
|
2746
|
+
* as a ExponentialHistogram of all reported double measurements over a time interval.
|
|
2747
|
+
*/
|
|
2748
|
+
declare const exponentialHistogramSchema: z.ZodSchema<ExponentialHistogram>;
|
|
2749
|
+
/**
|
|
2750
|
+
* Summary metric data are used to convey quantile summaries,
|
|
2751
|
+
* a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary)
|
|
2752
|
+
* and OpenMetrics (see: https://github.com/prometheus/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45)
|
|
2753
|
+
* data type. These data points cannot always be merged in a meaningful way.
|
|
2754
|
+
* While they can be useful in some applications, histogram data points are
|
|
2755
|
+
* recommended for new applications.
|
|
2756
|
+
* Summary metrics do not have an aggregation temporality field. This is
|
|
2757
|
+
* because the count and sum fields of a SummaryDataPoint are assumed to be
|
|
2758
|
+
* cumulative values.
|
|
2759
|
+
*/
|
|
2760
|
+
declare const summarySchema: z.ZodSchema<Summary>;
|
|
2761
|
+
/**
|
|
2762
|
+
* Defines a Metric which has one or more timeseries. The following is a
|
|
2763
|
+
* brief summary of the Metric data model. For more details, see:
|
|
2764
|
+
*
|
|
2765
|
+
* https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md
|
|
2766
|
+
*
|
|
2767
|
+
* The data model and relation between entities is shown in the
|
|
2768
|
+
* diagram below. Here, "DataPoint" is the term used to refer to any
|
|
2769
|
+
* one of the specific data point value types, and "points" is the term used
|
|
2770
|
+
* to refer to any one of the lists of points contained in the Metric.
|
|
2771
|
+
*
|
|
2772
|
+
* - Metric is composed of a metadata and data.
|
|
2773
|
+
* - Metadata part contains a name, description, unit.
|
|
2774
|
+
* - Data is one of the possible types (Sum, Gauge, Histogram, Summary).
|
|
2775
|
+
* - DataPoint contains timestamps, attributes, and one of the possible value type
|
|
2776
|
+
* fields.
|
|
2777
|
+
*
|
|
2778
|
+
* Metric
|
|
2779
|
+
* +------------+
|
|
2780
|
+
* |name |
|
|
2781
|
+
* |description |
|
|
2782
|
+
* |unit | +------------------------------------+
|
|
2783
|
+
* |data |---> |Gauge, Sum, Histogram, Summary, ... |
|
|
2784
|
+
* +------------+ +------------------------------------+
|
|
2785
|
+
*
|
|
2786
|
+
* Data [One of Gauge, Sum, Histogram, Summary, ...]
|
|
2787
|
+
* +-----------+
|
|
2788
|
+
* |... | // Metadata about the Data.
|
|
2789
|
+
* |points |--+
|
|
2790
|
+
* +-----------+ |
|
|
2791
|
+
* | +---------------------------+
|
|
2792
|
+
* | |DataPoint 1 |
|
|
2793
|
+
* v |+------+------+ +------+ |
|
|
2794
|
+
* +-----+ ||label |label |...|label | |
|
|
2795
|
+
* | 1 |-->||value1|value2|...|valueN| |
|
|
2796
|
+
* +-----+ |+------+------+ +------+ |
|
|
2797
|
+
* | . | |+-----+ |
|
|
2798
|
+
* | . | ||value| |
|
|
2799
|
+
* | . | |+-----+ |
|
|
2800
|
+
* | . | +---------------------------+
|
|
2801
|
+
* | . | .
|
|
2802
|
+
* | . | .
|
|
2803
|
+
* | . | .
|
|
2804
|
+
* | . | +---------------------------+
|
|
2805
|
+
* | . | |DataPoint M |
|
|
2806
|
+
* +-----+ |+------+------+ +------+ |
|
|
2807
|
+
* | M |-->||label |label |...|label | |
|
|
2808
|
+
* +-----+ ||value1|value2|...|valueN| |
|
|
2809
|
+
* |+------+------+ +------+ |
|
|
2810
|
+
* |+-----+ |
|
|
2811
|
+
* ||value| |
|
|
2812
|
+
* |+-----+ |
|
|
2813
|
+
* +---------------------------+
|
|
2814
|
+
*
|
|
2815
|
+
* Each distinct type of DataPoint represents the output of a specific
|
|
2816
|
+
* aggregation function, the result of applying the DataPoint's
|
|
2817
|
+
* associated function of to one or more measurements.
|
|
2818
|
+
*
|
|
2819
|
+
* All DataPoint types have three common fields:
|
|
2820
|
+
* - Attributes includes key-value pairs associated with the data point
|
|
2821
|
+
* - TimeUnixNano is required, set to the end time of the aggregation
|
|
2822
|
+
* - StartTimeUnixNano is optional, but strongly encouraged for DataPoints
|
|
2823
|
+
* having an AggregationTemporality field, as discussed below.
|
|
2824
|
+
*
|
|
2825
|
+
* Both TimeUnixNano and StartTimeUnixNano values are expressed as
|
|
2826
|
+
* UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
|
|
2827
|
+
*
|
|
2828
|
+
* # TimeUnixNano
|
|
2829
|
+
*
|
|
2830
|
+
* This field is required, having consistent interpretation across
|
|
2831
|
+
* DataPoint types. TimeUnixNano is the moment corresponding to when
|
|
2832
|
+
* the data point's aggregate value was captured.
|
|
2833
|
+
*
|
|
2834
|
+
* Data points with the 0 value for TimeUnixNano SHOULD be rejected
|
|
2835
|
+
* by consumers.
|
|
2836
|
+
*
|
|
2837
|
+
* # StartTimeUnixNano
|
|
2838
|
+
*
|
|
2839
|
+
* StartTimeUnixNano in general allows detecting when a sequence of
|
|
2840
|
+
* observations is unbroken. This field indicates to consumers the
|
|
2841
|
+
* start time for points with cumulative and delta
|
|
2842
|
+
* AggregationTemporality, and it should be included whenever possible
|
|
2843
|
+
* to support correct rate calculation. Although it may be omitted
|
|
2844
|
+
* when the start time is truly unknown, setting StartTimeUnixNano is
|
|
2845
|
+
* strongly encouraged.
|
|
2846
|
+
*/
|
|
2847
|
+
declare const metricSchema: z.ZodSchema<Metric>;
|
|
2848
|
+
/** A collection of Metrics produced by an Scope. */
|
|
2849
|
+
declare const scopeMetricsSchema: z.ZodSchema<ScopeMetrics>;
|
|
2850
|
+
/** A collection of ScopeMetrics from a Resource. */
|
|
2851
|
+
declare const resourceMetricsSchema: z.ZodSchema<ResourceMetrics>;
|
|
2852
|
+
/**
|
|
2853
|
+
* MetricsData represents the metrics data that can be stored in a persistent
|
|
2854
|
+
* storage, OR can be embedded by other protocols that transfer OTLP metrics
|
|
2855
|
+
* data but do not implement the OTLP protocol.
|
|
2856
|
+
*
|
|
2857
|
+
* MetricsData
|
|
2858
|
+
* └─── ResourceMetrics
|
|
2859
|
+
* ├── Resource
|
|
2860
|
+
* ├── SchemaURL
|
|
2861
|
+
* └── ScopeMetrics
|
|
2862
|
+
* ├── Scope
|
|
2863
|
+
* ├── SchemaURL
|
|
2864
|
+
* └── Metric
|
|
2865
|
+
* ├── Name
|
|
2866
|
+
* ├── Description
|
|
2867
|
+
* ├── Unit
|
|
2868
|
+
* └── data
|
|
2869
|
+
* ├── Gauge
|
|
2870
|
+
* ├── Sum
|
|
2871
|
+
* ├── Histogram
|
|
2872
|
+
* ├── ExponentialHistogram
|
|
2873
|
+
* └── Summary
|
|
2874
|
+
*
|
|
2875
|
+
* The main difference between this message and collector protocol is that
|
|
2876
|
+
* in this message there will not be any "control" or "metadata" specific to
|
|
2877
|
+
* OTLP protocol.
|
|
2878
|
+
*
|
|
2879
|
+
* When new fields are added into this message, the OTLP request MUST be updated
|
|
2880
|
+
* as well.
|
|
2881
|
+
*/
|
|
2882
|
+
declare const metricsDataSchema: z.ZodSchema<MetricsData>;
|
|
2883
|
+
//#endregion
|
|
2884
|
+
//#region src/index.d.ts
|
|
2885
|
+
declare const name = "@kopai/core";
|
|
2886
|
+
//#endregion
|
|
2887
|
+
export { data_filters_zod_d_exports as dataFilterSchemas, telemetry_datasource_d_exports as datasource, denormalized_signals_zod_d_exports as denormalizedSignals, name, otlp_generated_d_exports as otlp, otlp_metrics_generated_d_exports as otlpMetrics, otlp_metrics_zod_d_exports as otlpMetricsZod, otlp_zod_d_exports as otlpZod };
|
|
2888
|
+
//# sourceMappingURL=index.d.mts.map
|