@opentelemetry/otlp-grpc-exporter-base 0.37.0 → 0.39.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.
Files changed (34) hide show
  1. package/build/src/LogsExportServiceClient.d.ts +3 -0
  2. package/build/src/LogsExportServiceClient.js +46 -0
  3. package/build/src/LogsExportServiceClient.js.map +1 -0
  4. package/build/src/MetricsExportServiceClient.d.ts +3 -0
  5. package/build/src/MetricsExportServiceClient.js +46 -0
  6. package/build/src/MetricsExportServiceClient.js.map +1 -0
  7. package/build/src/TraceExportServiceClient.d.ts +3 -0
  8. package/build/src/TraceExportServiceClient.js +46 -0
  9. package/build/src/TraceExportServiceClient.js.map +1 -0
  10. package/build/src/generated/root.d.ts +4 -0
  11. package/build/src/generated/root.js +13013 -0
  12. package/build/src/generated/root.js.map +1 -0
  13. package/build/src/internal-types.d.ts +8 -0
  14. package/build/src/internal-types.js +18 -0
  15. package/build/src/internal-types.js.map +1 -0
  16. package/build/src/types.d.ts +6 -4
  17. package/build/src/types.js +1 -0
  18. package/build/src/types.js.map +1 -1
  19. package/build/src/util.d.ts +1 -1
  20. package/build/src/util.js +32 -28
  21. package/build/src/util.js.map +1 -1
  22. package/build/src/version.d.ts +1 -1
  23. package/build/src/version.js +1 -1
  24. package/build/src/version.js.map +1 -1
  25. package/package.json +13 -14
  26. package/build/protos/opentelemetry/proto/collector/logs/v1/logs_service.proto +0 -45
  27. package/build/protos/opentelemetry/proto/collector/metrics/v1/metrics_service.proto +0 -45
  28. package/build/protos/opentelemetry/proto/collector/trace/v1/trace_service.proto +0 -45
  29. package/build/protos/opentelemetry/proto/common/v1/common.proto +0 -87
  30. package/build/protos/opentelemetry/proto/logs/v1/logs.proto +0 -222
  31. package/build/protos/opentelemetry/proto/metrics/v1/metrics.proto +0 -711
  32. package/build/protos/opentelemetry/proto/resource/v1/resource.proto +0 -36
  33. package/build/protos/opentelemetry/proto/trace/v1/trace.proto +0 -331
  34. package/build/protos/opentelemetry/proto/trace/v1/trace_config.proto +0 -78
@@ -1,711 +0,0 @@
1
- // Copyright 2019, OpenTelemetry Authors
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- syntax = "proto3";
16
-
17
- package opentelemetry.proto.metrics.v1;
18
-
19
- import "opentelemetry/proto/common/v1/common.proto";
20
- import "opentelemetry/proto/resource/v1/resource.proto";
21
-
22
- option java_multiple_files = true;
23
- option java_package = "io.opentelemetry.proto.metrics.v1";
24
- option java_outer_classname = "MetricsProto";
25
- option go_package = "go.opentelemetry.io/proto/otlp/metrics/v1";
26
-
27
- // MetricsData represents the metrics data that can be stored in a persistent
28
- // storage, OR can be embedded by other protocols that transfer OTLP metrics
29
- // data but do not implement the OTLP protocol.
30
- //
31
- // The main difference between this message and collector protocol is that
32
- // in this message there will not be any "control" or "metadata" specific to
33
- // OTLP protocol.
34
- //
35
- // When new fields are added into this message, the OTLP request MUST be updated
36
- // as well.
37
- message MetricsData {
38
- // An array of ResourceMetrics.
39
- // For data coming from a single resource this array will typically contain
40
- // one element. Intermediary nodes that receive data from multiple origins
41
- // typically batch the data before forwarding further and in that case this
42
- // array will contain multiple elements.
43
- repeated ResourceMetrics resource_metrics = 1;
44
- }
45
-
46
- // A collection of ScopeMetrics from a Resource.
47
- message ResourceMetrics {
48
- // The resource for the metrics in this message.
49
- // If this field is not set then no resource info is known.
50
- opentelemetry.proto.resource.v1.Resource resource = 1;
51
-
52
- // A list of metrics that originate from a resource.
53
- repeated ScopeMetrics scope_metrics = 2;
54
-
55
- // A list of InstrumentationLibraryMetrics that originate from a resource.
56
- // This field is deprecated and will be removed after grace period expires on June 15, 2022.
57
- //
58
- // During the grace period the following rules SHOULD be followed:
59
- //
60
- // For Binary Protobufs
61
- // ====================
62
- // Binary Protobuf senders SHOULD NOT set instrumentation_library_metrics. Instead
63
- // scope_metrics SHOULD be set.
64
- //
65
- // Binary Protobuf receivers SHOULD check if instrumentation_library_metrics is set
66
- // and scope_metrics is not set then the value in instrumentation_library_metrics
67
- // SHOULD be used instead by converting InstrumentationLibraryMetrics into ScopeMetrics.
68
- // If scope_metrics is set then instrumentation_library_metrics SHOULD be ignored.
69
- //
70
- // For JSON
71
- // ========
72
- // JSON senders that set instrumentation_library_metrics field MAY also set
73
- // scope_metrics to carry the same metrics, essentially double-publishing the same data.
74
- // Such double-publishing MAY be controlled by a user-settable option.
75
- // If double-publishing is not used then the senders SHOULD set scope_metrics and
76
- // SHOULD NOT set instrumentation_library_metrics.
77
- //
78
- // JSON receivers SHOULD check if instrumentation_library_metrics is set and
79
- // scope_metrics is not set then the value in instrumentation_library_metrics
80
- // SHOULD be used instead by converting InstrumentationLibraryMetrics into ScopeMetrics.
81
- // If scope_metrics is set then instrumentation_library_metrics field SHOULD be ignored.
82
- repeated InstrumentationLibraryMetrics instrumentation_library_metrics = 1000 [deprecated = true];
83
-
84
- // This schema_url applies to the data in the "resource" field. It does not apply
85
- // to the data in the "scope_metrics" field which have their own schema_url field.
86
- string schema_url = 3;
87
- }
88
-
89
- // A collection of Metrics produced by an Scope.
90
- message ScopeMetrics {
91
- // The instrumentation scope information for the metrics in this message.
92
- // Semantically when InstrumentationScope isn't set, it is equivalent with
93
- // an empty instrumentation scope name (unknown).
94
- opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
95
-
96
- // A list of metrics that originate from an instrumentation library.
97
- repeated Metric metrics = 2;
98
-
99
- // This schema_url applies to all metrics in the "metrics" field.
100
- string schema_url = 3;
101
- }
102
-
103
- // A collection of Metrics produced by an InstrumentationLibrary.
104
- // InstrumentationLibraryMetrics is wire-compatible with ScopeMetrics for binary
105
- // Protobuf format.
106
- // This message is deprecated and will be removed on June 15, 2022.
107
- message InstrumentationLibraryMetrics {
108
- option deprecated = true;
109
-
110
- // The instrumentation library information for the metrics in this message.
111
- // Semantically when InstrumentationLibrary isn't set, it is equivalent with
112
- // an empty instrumentation library name (unknown).
113
- opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;
114
-
115
- // A list of metrics that originate from an instrumentation library.
116
- repeated Metric metrics = 2;
117
-
118
- // This schema_url applies to all metrics in the "metrics" field.
119
- string schema_url = 3;
120
- }
121
-
122
- // Defines a Metric which has one or more timeseries. The following is a
123
- // brief summary of the Metric data model. For more details, see:
124
- //
125
- // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/datamodel.md
126
- //
127
- //
128
- // The data model and relation between entities is shown in the
129
- // diagram below. Here, "DataPoint" is the term used to refer to any
130
- // one of the specific data point value types, and "points" is the term used
131
- // to refer to any one of the lists of points contained in the Metric.
132
- //
133
- // - Metric is composed of a metadata and data.
134
- // - Metadata part contains a name, description, unit.
135
- // - Data is one of the possible types (Sum, Gauge, Histogram, Summary).
136
- // - DataPoint contains timestamps, attributes, and one of the possible value type
137
- // fields.
138
- //
139
- // Metric
140
- // +------------+
141
- // |name |
142
- // |description |
143
- // |unit | +------------------------------------+
144
- // |data |---> |Gauge, Sum, Histogram, Summary, ... |
145
- // +------------+ +------------------------------------+
146
- //
147
- // Data [One of Gauge, Sum, Histogram, Summary, ...]
148
- // +-----------+
149
- // |... | // Metadata about the Data.
150
- // |points |--+
151
- // +-----------+ |
152
- // | +---------------------------+
153
- // | |DataPoint 1 |
154
- // v |+------+------+ +------+ |
155
- // +-----+ ||label |label |...|label | |
156
- // | 1 |-->||value1|value2|...|valueN| |
157
- // +-----+ |+------+------+ +------+ |
158
- // | . | |+-----+ |
159
- // | . | ||value| |
160
- // | . | |+-----+ |
161
- // | . | +---------------------------+
162
- // | . | .
163
- // | . | .
164
- // | . | .
165
- // | . | +---------------------------+
166
- // | . | |DataPoint M |
167
- // +-----+ |+------+------+ +------+ |
168
- // | M |-->||label |label |...|label | |
169
- // +-----+ ||value1|value2|...|valueN| |
170
- // |+------+------+ +------+ |
171
- // |+-----+ |
172
- // ||value| |
173
- // |+-----+ |
174
- // +---------------------------+
175
- //
176
- // Each distinct type of DataPoint represents the output of a specific
177
- // aggregation function, the result of applying the DataPoint's
178
- // associated function of to one or more measurements.
179
- //
180
- // All DataPoint types have three common fields:
181
- // - Attributes includes key-value pairs associated with the data point
182
- // - TimeUnixNano is required, set to the end time of the aggregation
183
- // - StartTimeUnixNano is optional, but strongly encouraged for DataPoints
184
- // having an AggregationTemporality field, as discussed below.
185
- //
186
- // Both TimeUnixNano and StartTimeUnixNano values are expressed as
187
- // UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
188
- //
189
- // # TimeUnixNano
190
- //
191
- // This field is required, having consistent interpretation across
192
- // DataPoint types. TimeUnixNano is the moment corresponding to when
193
- // the data point's aggregate value was captured.
194
- //
195
- // Data points with the 0 value for TimeUnixNano SHOULD be rejected
196
- // by consumers.
197
- //
198
- // # StartTimeUnixNano
199
- //
200
- // StartTimeUnixNano in general allows detecting when a sequence of
201
- // observations is unbroken. This field indicates to consumers the
202
- // start time for points with cumulative and delta
203
- // AggregationTemporality, and it should be included whenever possible
204
- // to support correct rate calculation. Although it may be omitted
205
- // when the start time is truly unknown, setting StartTimeUnixNano is
206
- // strongly encouraged.
207
- message Metric {
208
- reserved 4, 6, 8;
209
-
210
- // name of the metric, including its DNS name prefix. It must be unique.
211
- string name = 1;
212
-
213
- // description of the metric, which can be used in documentation.
214
- string description = 2;
215
-
216
- // unit in which the metric value is reported. Follows the format
217
- // described by http://unitsofmeasure.org/ucum.html.
218
- string unit = 3;
219
-
220
- // Data determines the aggregation type (if any) of the metric, what is the
221
- // reported value type for the data points, as well as the relatationship to
222
- // the time interval over which they are reported.
223
- oneof data {
224
- Gauge gauge = 5;
225
- Sum sum = 7;
226
- Histogram histogram = 9;
227
- ExponentialHistogram exponential_histogram = 10;
228
- Summary summary = 11;
229
- }
230
- }
231
-
232
- // Gauge represents the type of a scalar metric that always exports the
233
- // "current value" for every data point. It should be used for an "unknown"
234
- // aggregation.
235
- //
236
- // A Gauge does not support different aggregation temporalities. Given the
237
- // aggregation is unknown, points cannot be combined using the same
238
- // aggregation, regardless of aggregation temporalities. Therefore,
239
- // AggregationTemporality is not included. Consequently, this also means
240
- // "StartTimeUnixNano" is ignored for all data points.
241
- message Gauge {
242
- repeated NumberDataPoint data_points = 1;
243
- }
244
-
245
- // Sum represents the type of a scalar metric that is calculated as a sum of all
246
- // reported measurements over a time interval.
247
- message Sum {
248
- repeated NumberDataPoint data_points = 1;
249
-
250
- // aggregation_temporality describes if the aggregator reports delta changes
251
- // since last report time, or cumulative changes since a fixed start time.
252
- AggregationTemporality aggregation_temporality = 2;
253
-
254
- // If "true" means that the sum is monotonic.
255
- bool is_monotonic = 3;
256
- }
257
-
258
- // Histogram represents the type of a metric that is calculated by aggregating
259
- // as a Histogram of all reported measurements over a time interval.
260
- message Histogram {
261
- repeated HistogramDataPoint data_points = 1;
262
-
263
- // aggregation_temporality describes if the aggregator reports delta changes
264
- // since last report time, or cumulative changes since a fixed start time.
265
- AggregationTemporality aggregation_temporality = 2;
266
- }
267
-
268
- // ExponentialHistogram represents the type of a metric that is calculated by aggregating
269
- // as a ExponentialHistogram of all reported double measurements over a time interval.
270
- message ExponentialHistogram {
271
- repeated ExponentialHistogramDataPoint data_points = 1;
272
-
273
- // aggregation_temporality describes if the aggregator reports delta changes
274
- // since last report time, or cumulative changes since a fixed start time.
275
- AggregationTemporality aggregation_temporality = 2;
276
- }
277
-
278
- // Summary metric data are used to convey quantile summaries,
279
- // a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary)
280
- // and OpenMetrics (see: https://github.com/OpenObservability/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45)
281
- // data type. These data points cannot always be merged in a meaningful way.
282
- // While they can be useful in some applications, histogram data points are
283
- // recommended for new applications.
284
- message Summary {
285
- repeated SummaryDataPoint data_points = 1;
286
- }
287
-
288
- // AggregationTemporality defines how a metric aggregator reports aggregated
289
- // values. It describes how those values relate to the time interval over
290
- // which they are aggregated.
291
- enum AggregationTemporality {
292
- // UNSPECIFIED is the default AggregationTemporality, it MUST not be used.
293
- AGGREGATION_TEMPORALITY_UNSPECIFIED = 0;
294
-
295
- // DELTA is an AggregationTemporality for a metric aggregator which reports
296
- // changes since last report time. Successive metrics contain aggregation of
297
- // values from continuous and non-overlapping intervals.
298
- //
299
- // The values for a DELTA metric are based only on the time interval
300
- // associated with one measurement cycle. There is no dependency on
301
- // previous measurements like is the case for CUMULATIVE metrics.
302
- //
303
- // For example, consider a system measuring the number of requests that
304
- // it receives and reports the sum of these requests every second as a
305
- // DELTA metric:
306
- //
307
- // 1. The system starts receiving at time=t_0.
308
- // 2. A request is received, the system measures 1 request.
309
- // 3. A request is received, the system measures 1 request.
310
- // 4. A request is received, the system measures 1 request.
311
- // 5. The 1 second collection cycle ends. A metric is exported for the
312
- // number of requests received over the interval of time t_0 to
313
- // t_0+1 with a value of 3.
314
- // 6. A request is received, the system measures 1 request.
315
- // 7. A request is received, the system measures 1 request.
316
- // 8. The 1 second collection cycle ends. A metric is exported for the
317
- // number of requests received over the interval of time t_0+1 to
318
- // t_0+2 with a value of 2.
319
- AGGREGATION_TEMPORALITY_DELTA = 1;
320
-
321
- // CUMULATIVE is an AggregationTemporality for a metric aggregator which
322
- // reports changes since a fixed start time. This means that current values
323
- // of a CUMULATIVE metric depend on all previous measurements since the
324
- // start time. Because of this, the sender is required to retain this state
325
- // in some form. If this state is lost or invalidated, the CUMULATIVE metric
326
- // values MUST be reset and a new fixed start time following the last
327
- // reported measurement time sent MUST be used.
328
- //
329
- // For example, consider a system measuring the number of requests that
330
- // it receives and reports the sum of these requests every second as a
331
- // CUMULATIVE metric:
332
- //
333
- // 1. The system starts receiving at time=t_0.
334
- // 2. A request is received, the system measures 1 request.
335
- // 3. A request is received, the system measures 1 request.
336
- // 4. A request is received, the system measures 1 request.
337
- // 5. The 1 second collection cycle ends. A metric is exported for the
338
- // number of requests received over the interval of time t_0 to
339
- // t_0+1 with a value of 3.
340
- // 6. A request is received, the system measures 1 request.
341
- // 7. A request is received, the system measures 1 request.
342
- // 8. The 1 second collection cycle ends. A metric is exported for the
343
- // number of requests received over the interval of time t_0 to
344
- // t_0+2 with a value of 5.
345
- // 9. The system experiences a fault and loses state.
346
- // 10. The system recovers and resumes receiving at time=t_1.
347
- // 11. A request is received, the system measures 1 request.
348
- // 12. The 1 second collection cycle ends. A metric is exported for the
349
- // number of requests received over the interval of time t_1 to
350
- // t_0+1 with a value of 1.
351
- //
352
- // Note: Even though, when reporting changes since last report time, using
353
- // CUMULATIVE is valid, it is not recommended. This may cause problems for
354
- // systems that do not use start_time to determine when the aggregation
355
- // value was reset (e.g. Prometheus).
356
- AGGREGATION_TEMPORALITY_CUMULATIVE = 2;
357
- }
358
-
359
- // DataPointFlags is defined as a protobuf 'uint32' type and is to be used as a
360
- // bit-field representing 32 distinct boolean flags. Each flag defined in this
361
- // enum is a bit-mask. To test the presence of a single flag in the flags of
362
- // a data point, for example, use an expression like:
363
- //
364
- // (point.flags & FLAG_NO_RECORDED_VALUE) == FLAG_NO_RECORDED_VALUE
365
- //
366
- enum DataPointFlags {
367
- FLAG_NONE = 0;
368
-
369
- // This DataPoint is valid but has no recorded value. This value
370
- // SHOULD be used to reflect explicitly missing data in a series, as
371
- // for an equivalent to the Prometheus "staleness marker".
372
- FLAG_NO_RECORDED_VALUE = 1;
373
-
374
- // Bits 2-31 are reserved for future use.
375
- }
376
-
377
- // NumberDataPoint is a single data point in a timeseries that describes the
378
- // time-varying scalar value of a metric.
379
- message NumberDataPoint {
380
- reserved 1;
381
-
382
- // The set of key/value pairs that uniquely identify the timeseries from
383
- // where this point belongs. The list may be empty (may contain 0 elements).
384
- // Attribute keys MUST be unique (it is not allowed to have more than one
385
- // attribute with the same key).
386
- repeated opentelemetry.proto.common.v1.KeyValue attributes = 7;
387
-
388
- // StartTimeUnixNano is optional but strongly encouraged, see the
389
- // the detailed comments above Metric.
390
- //
391
- // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
392
- // 1970.
393
- fixed64 start_time_unix_nano = 2;
394
-
395
- // TimeUnixNano is required, see the detailed comments above Metric.
396
- //
397
- // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
398
- // 1970.
399
- fixed64 time_unix_nano = 3;
400
-
401
- // The value itself. A point is considered invalid when one of the recognized
402
- // value fields is not present inside this oneof.
403
- oneof value {
404
- double as_double = 4;
405
- sfixed64 as_int = 6;
406
- }
407
-
408
- // (Optional) List of exemplars collected from
409
- // measurements that were used to form the data point
410
- repeated Exemplar exemplars = 5;
411
-
412
- // Flags that apply to this specific data point. See DataPointFlags
413
- // for the available flags and their meaning.
414
- uint32 flags = 8;
415
- }
416
-
417
- // HistogramDataPoint is a single data point in a timeseries that describes the
418
- // time-varying values of a Histogram. A Histogram contains summary statistics
419
- // for a population of values, it may optionally contain the distribution of
420
- // those values across a set of buckets.
421
- //
422
- // If the histogram contains the distribution of values, then both
423
- // "explicit_bounds" and "bucket counts" fields must be defined.
424
- // If the histogram does not contain the distribution of values, then both
425
- // "explicit_bounds" and "bucket_counts" must be omitted and only "count" and
426
- // "sum" are known.
427
- message HistogramDataPoint {
428
- reserved 1;
429
-
430
- // The set of key/value pairs that uniquely identify the timeseries from
431
- // where this point belongs. The list may be empty (may contain 0 elements).
432
- // Attribute keys MUST be unique (it is not allowed to have more than one
433
- // attribute with the same key).
434
- repeated opentelemetry.proto.common.v1.KeyValue attributes = 9;
435
-
436
- // StartTimeUnixNano is optional but strongly encouraged, see the
437
- // the detailed comments above Metric.
438
- //
439
- // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
440
- // 1970.
441
- fixed64 start_time_unix_nano = 2;
442
-
443
- // TimeUnixNano is required, see the detailed comments above Metric.
444
- //
445
- // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
446
- // 1970.
447
- fixed64 time_unix_nano = 3;
448
-
449
- // count is the number of values in the population. Must be non-negative. This
450
- // value must be equal to the sum of the "count" fields in buckets if a
451
- // histogram is provided.
452
- fixed64 count = 4;
453
-
454
- // sum of the values in the population. If count is zero then this field
455
- // must be zero.
456
- //
457
- // Note: Sum should only be filled out when measuring non-negative discrete
458
- // events, and is assumed to be monotonic over the values of these events.
459
- // Negative events *can* be recorded, but sum should not be filled out when
460
- // doing so. This is specifically to enforce compatibility w/ OpenMetrics,
461
- // see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
462
- optional double sum = 5;
463
-
464
- // bucket_counts is an optional field contains the count values of histogram
465
- // for each bucket.
466
- //
467
- // The sum of the bucket_counts must equal the value in the count field.
468
- //
469
- // The number of elements in bucket_counts array must be by one greater than
470
- // the number of elements in explicit_bounds array.
471
- repeated fixed64 bucket_counts = 6;
472
-
473
- // explicit_bounds specifies buckets with explicitly defined bounds for values.
474
- //
475
- // The boundaries for bucket at index i are:
476
- //
477
- // (-infinity, explicit_bounds[i]] for i == 0
478
- // (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
479
- // (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
480
- //
481
- // The values in the explicit_bounds array must be strictly increasing.
482
- //
483
- // Histogram buckets are inclusive of their upper boundary, except the last
484
- // bucket where the boundary is at infinity. This format is intentionally
485
- // compatible with the OpenMetrics histogram definition.
486
- repeated double explicit_bounds = 7;
487
-
488
- // (Optional) List of exemplars collected from
489
- // measurements that were used to form the data point
490
- repeated Exemplar exemplars = 8;
491
-
492
- // Flags that apply to this specific data point. See DataPointFlags
493
- // for the available flags and their meaning.
494
- uint32 flags = 10;
495
-
496
- // min is the minimum value over (start_time, end_time].
497
- optional double min = 11;
498
-
499
- // max is the maximum value over (start_time, end_time].
500
- optional double max = 12;
501
- }
502
-
503
- // ExponentialHistogramDataPoint is a single data point in a timeseries that describes the
504
- // time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains
505
- // summary statistics for a population of values, it may optionally contain the
506
- // distribution of those values across a set of buckets.
507
- //
508
- message ExponentialHistogramDataPoint {
509
- // The set of key/value pairs that uniquely identify the timeseries from
510
- // where this point belongs. The list may be empty (may contain 0 elements).
511
- // Attribute keys MUST be unique (it is not allowed to have more than one
512
- // attribute with the same key).
513
- repeated opentelemetry.proto.common.v1.KeyValue attributes = 1;
514
-
515
- // StartTimeUnixNano is optional but strongly encouraged, see the
516
- // the detailed comments above Metric.
517
- //
518
- // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
519
- // 1970.
520
- fixed64 start_time_unix_nano = 2;
521
-
522
- // TimeUnixNano is required, see the detailed comments above Metric.
523
- //
524
- // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
525
- // 1970.
526
- fixed64 time_unix_nano = 3;
527
-
528
- // count is the number of values in the population. Must be
529
- // non-negative. This value must be equal to the sum of the "bucket_counts"
530
- // values in the positive and negative Buckets plus the "zero_count" field.
531
- fixed64 count = 4;
532
-
533
- // sum of the values in the population. If count is zero then this field
534
- // must be zero.
535
- //
536
- // Note: Sum should only be filled out when measuring non-negative discrete
537
- // events, and is assumed to be monotonic over the values of these events.
538
- // Negative events *can* be recorded, but sum should not be filled out when
539
- // doing so. This is specifically to enforce compatibility w/ OpenMetrics,
540
- // see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
541
- optional double sum = 5;
542
-
543
- // scale describes the resolution of the histogram. Boundaries are
544
- // located at powers of the base, where:
545
- //
546
- // base = (2^(2^-scale))
547
- //
548
- // The histogram bucket identified by `index`, a signed integer,
549
- // contains values that are greater than or equal to (base^index) and
550
- // less than (base^(index+1)).
551
- //
552
- // The positive and negative ranges of the histogram are expressed
553
- // separately. Negative values are mapped by their absolute value
554
- // into the negative range using the same scale as the positive range.
555
- //
556
- // scale is not restricted by the protocol, as the permissible
557
- // values depend on the range of the data.
558
- sint32 scale = 6;
559
-
560
- // zero_count is the count of values that are either exactly zero or
561
- // within the region considered zero by the instrumentation at the
562
- // tolerated degree of precision. This bucket stores values that
563
- // cannot be expressed using the standard exponential formula as
564
- // well as values that have been rounded to zero.
565
- //
566
- // Implementations MAY consider the zero bucket to have probability
567
- // mass equal to (zero_count / count).
568
- fixed64 zero_count = 7;
569
-
570
- // positive carries the positive range of exponential bucket counts.
571
- Buckets positive = 8;
572
-
573
- // negative carries the negative range of exponential bucket counts.
574
- Buckets negative = 9;
575
-
576
- // Buckets are a set of bucket counts, encoded in a contiguous array
577
- // of counts.
578
- message Buckets {
579
- // Offset is the bucket index of the first entry in the bucket_counts array.
580
- //
581
- // Note: This uses a varint encoding as a simple form of compression.
582
- sint32 offset = 1;
583
-
584
- // Count is an array of counts, where count[i] carries the count
585
- // of the bucket at index (offset+i). count[i] is the count of
586
- // values greater than or equal to base^(offset+i) and less than
587
- // base^(offset+i+1).
588
- //
589
- // Note: By contrast, the explicit HistogramDataPoint uses
590
- // fixed64. This field is expected to have many buckets,
591
- // especially zeros, so uint64 has been selected to ensure
592
- // varint encoding.
593
- repeated uint64 bucket_counts = 2;
594
- }
595
-
596
- // Flags that apply to this specific data point. See DataPointFlags
597
- // for the available flags and their meaning.
598
- uint32 flags = 10;
599
-
600
- // (Optional) List of exemplars collected from
601
- // measurements that were used to form the data point
602
- repeated Exemplar exemplars = 11;
603
-
604
- // min is the minimum value over (start_time, end_time].
605
- optional double min = 12;
606
-
607
- // max is the maximum value over (start_time, end_time].
608
- optional double max = 13;
609
- }
610
-
611
- // SummaryDataPoint is a single data point in a timeseries that describes the
612
- // time-varying values of a Summary metric.
613
- message SummaryDataPoint {
614
- reserved 1;
615
-
616
- // The set of key/value pairs that uniquely identify the timeseries from
617
- // where this point belongs. The list may be empty (may contain 0 elements).
618
- // Attribute keys MUST be unique (it is not allowed to have more than one
619
- // attribute with the same key).
620
- repeated opentelemetry.proto.common.v1.KeyValue attributes = 7;
621
-
622
- // StartTimeUnixNano is optional but strongly encouraged, see the
623
- // the detailed comments above Metric.
624
- //
625
- // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
626
- // 1970.
627
- fixed64 start_time_unix_nano = 2;
628
-
629
- // TimeUnixNano is required, see the detailed comments above Metric.
630
- //
631
- // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
632
- // 1970.
633
- fixed64 time_unix_nano = 3;
634
-
635
- // count is the number of values in the population. Must be non-negative.
636
- fixed64 count = 4;
637
-
638
- // sum of the values in the population. If count is zero then this field
639
- // must be zero.
640
- //
641
- // Note: Sum should only be filled out when measuring non-negative discrete
642
- // events, and is assumed to be monotonic over the values of these events.
643
- // Negative events *can* be recorded, but sum should not be filled out when
644
- // doing so. This is specifically to enforce compatibility w/ OpenMetrics,
645
- // see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary
646
- double sum = 5;
647
-
648
- // Represents the value at a given quantile of a distribution.
649
- //
650
- // To record Min and Max values following conventions are used:
651
- // - The 1.0 quantile is equivalent to the maximum value observed.
652
- // - The 0.0 quantile is equivalent to the minimum value observed.
653
- //
654
- // See the following issue for more context:
655
- // https://github.com/open-telemetry/opentelemetry-proto/issues/125
656
- message ValueAtQuantile {
657
- // The quantile of a distribution. Must be in the interval
658
- // [0.0, 1.0].
659
- double quantile = 1;
660
-
661
- // The value at the given quantile of a distribution.
662
- //
663
- // Quantile values must NOT be negative.
664
- double value = 2;
665
- }
666
-
667
- // (Optional) list of values at different quantiles of the distribution calculated
668
- // from the current snapshot. The quantiles must be strictly increasing.
669
- repeated ValueAtQuantile quantile_values = 6;
670
-
671
- // Flags that apply to this specific data point. See DataPointFlags
672
- // for the available flags and their meaning.
673
- uint32 flags = 8;
674
- }
675
-
676
- // A representation of an exemplar, which is a sample input measurement.
677
- // Exemplars also hold information about the environment when the measurement
678
- // was recorded, for example the span and trace ID of the active span when the
679
- // exemplar was recorded.
680
- message Exemplar {
681
- reserved 1;
682
-
683
- // The set of key/value pairs that were filtered out by the aggregator, but
684
- // recorded alongside the original measurement. Only key/value pairs that were
685
- // filtered out by the aggregator should be included
686
- repeated opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
687
-
688
- // time_unix_nano is the exact time when this exemplar was recorded
689
- //
690
- // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
691
- // 1970.
692
- fixed64 time_unix_nano = 2;
693
-
694
- // The value of the measurement that was recorded. An exemplar is
695
- // considered invalid when one of the recognized value fields is not present
696
- // inside this oneof.
697
- oneof value {
698
- double as_double = 3;
699
- sfixed64 as_int = 6;
700
- }
701
-
702
- // (Optional) Span ID of the exemplar trace.
703
- // span_id may be missing if the measurement is not recorded inside a trace
704
- // or if the trace is not sampled.
705
- bytes span_id = 4;
706
-
707
- // (Optional) Trace ID of the exemplar trace.
708
- // trace_id may be missing if the measurement is not recorded inside a trace
709
- // or if the trace is not sampled.
710
- bytes trace_id = 5;
711
- }