@opentelemetry/otlp-grpc-exporter-base 0.28.0 → 0.29.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.
@@ -24,7 +24,7 @@ import "opentelemetry/proto/logs/v1/logs.proto";
24
24
  option java_multiple_files = true;
25
25
  option java_package = "io.opentelemetry.proto.collector.logs.v1";
26
26
  option java_outer_classname = "LogsServiceProto";
27
- option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/collector/logs/v1";
27
+ option go_package = "go.opentelemetry.io/proto/otlp/collector/logs/v1";
28
28
 
29
29
  // Service that can be used to push logs between one Application instrumented with
30
30
  // OpenTelemetry and an collector, or between an collector and a central collector (in this
@@ -21,7 +21,7 @@ import "opentelemetry/proto/metrics/v1/metrics.proto";
21
21
  option java_multiple_files = true;
22
22
  option java_package = "io.opentelemetry.proto.collector.metrics.v1";
23
23
  option java_outer_classname = "MetricsServiceProto";
24
- option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/collector/metrics/v1";
24
+ option go_package = "go.opentelemetry.io/proto/otlp/collector/metrics/v1";
25
25
 
26
26
  // Service that can be used to push metrics between one Application
27
27
  // instrumented with OpenTelemetry and a collector, or between a collector and a
@@ -21,10 +21,10 @@ import "opentelemetry/proto/trace/v1/trace.proto";
21
21
  option java_multiple_files = true;
22
22
  option java_package = "io.opentelemetry.proto.collector.trace.v1";
23
23
  option java_outer_classname = "TraceServiceProto";
24
- option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/collector/trace/v1";
24
+ option go_package = "go.opentelemetry.io/proto/otlp/collector/trace/v1";
25
25
 
26
26
  // Service that can be used to push spans between one Application instrumented with
27
- // OpenTelemetry and an collector, or between an collector and a central collector (in this
27
+ // OpenTelemetry and a collector, or between a collector and a central collector (in this
28
28
  // case spans are sent/received to/from multiple Applications).
29
29
  service TraceService {
30
30
  // For performance reasons, it is recommended to keep this RPC
@@ -19,14 +19,14 @@ package opentelemetry.proto.common.v1;
19
19
  option java_multiple_files = true;
20
20
  option java_package = "io.opentelemetry.proto.common.v1";
21
21
  option java_outer_classname = "CommonProto";
22
- option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/common/v1";
22
+ option go_package = "go.opentelemetry.io/proto/otlp/common/v1";
23
23
 
24
24
  // AnyValue is used to represent any type of attribute value. AnyValue may contain a
25
25
  // primitive value such as a string or integer or it may contain an arbitrary nested
26
26
  // object containing arrays, key-value lists and primitives.
27
27
  message AnyValue {
28
28
  // The value is one of the listed fields. It is valid for all values to be unspecified
29
- // in which case this AnyValue is considered to be "null".
29
+ // in which case this AnyValue is considered to be "empty".
30
30
  oneof value {
31
31
  string string_value = 1;
32
32
  bool bool_value = 2;
@@ -34,6 +34,7 @@ message AnyValue {
34
34
  double double_value = 4;
35
35
  ArrayValue array_value = 5;
36
36
  KeyValueList kvlist_value = 6;
37
+ bytes bytes_value = 7;
37
38
  }
38
39
  }
39
40
 
@@ -52,6 +53,8 @@ message ArrayValue {
52
53
  message KeyValueList {
53
54
  // A collection of key/value pairs of key-value pairs. The list may be empty (may
54
55
  // contain 0 elements).
56
+ // The keys MUST be unique (it is not allowed to have more than one
57
+ // value with the same key).
55
58
  repeated KeyValue values = 1;
56
59
  }
57
60
 
@@ -62,16 +65,23 @@ message KeyValue {
62
65
  AnyValue value = 2;
63
66
  }
64
67
 
65
- // StringKeyValue is a pair of key/value strings. This is the simpler (and faster) version
66
- // of KeyValue that only supports string values.
67
- message StringKeyValue {
68
- string key = 1;
69
- string value = 2;
68
+ // InstrumentationLibrary is a message representing the instrumentation library information
69
+ // such as the fully qualified name and version.
70
+ // InstrumentationLibrary is wire-compatible with InstrumentationScope for binary
71
+ // Protobuf format.
72
+ // This message is deprecated and will be removed on June 15, 2022.
73
+ message InstrumentationLibrary {
74
+ option deprecated = true;
75
+
76
+ // An empty instrumentation library name means the name is unknown.
77
+ string name = 1;
78
+ string version = 2;
70
79
  }
71
80
 
72
- // InstrumentationLibrary is a message representing the instrumentation library information
81
+ // InstrumentationScope is a message representing the instrumentation scope information
73
82
  // such as the fully qualified name and version.
74
- message InstrumentationLibrary {
83
+ message InstrumentationScope {
84
+ // An empty instrumentation scope name means the name is unknown.
75
85
  string name = 1;
76
86
  string version = 2;
77
87
  }
@@ -22,110 +22,201 @@ import "opentelemetry/proto/resource/v1/resource.proto";
22
22
  option java_multiple_files = true;
23
23
  option java_package = "io.opentelemetry.proto.logs.v1";
24
24
  option java_outer_classname = "LogsProto";
25
- option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/logs/v1";
25
+ option go_package = "go.opentelemetry.io/proto/otlp/logs/v1";
26
26
 
27
- // A collection of InstrumentationLibraryLogs from a Resource.
27
+ // LogsData represents the logs data that can be stored in a persistent storage,
28
+ // OR can be embedded by other protocols that transfer OTLP logs data but do not
29
+ // 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 LogsData {
38
+ // An array of ResourceLogs.
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 ResourceLogs resource_logs = 1;
44
+ }
45
+
46
+ // A collection of ScopeLogs from a Resource.
28
47
  message ResourceLogs {
29
- // The resource for the logs in this message.
30
- // If this field is not set then no resource info is known.
31
- opentelemetry.proto.resource.v1.Resource resource = 1;
48
+ // The resource for the logs in this message.
49
+ // If this field is not set then resource info is unknown.
50
+ opentelemetry.proto.resource.v1.Resource resource = 1;
51
+
52
+ // A list of ScopeLogs that originate from a resource.
53
+ repeated ScopeLogs scope_logs = 2;
54
+
55
+ // A list of InstrumentationLibraryLogs 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_logs. Instead
63
+ // scope_logs SHOULD be set.
64
+ //
65
+ // Binary Protobuf receivers SHOULD check if instrumentation_library_logs is set
66
+ // and scope_logs is not set then the value in instrumentation_library_logs
67
+ // SHOULD be used instead by converting InstrumentationLibraryLogs into ScopeLogs.
68
+ // If scope_logs is set then instrumentation_library_logs SHOULD be ignored.
69
+ //
70
+ // For JSON
71
+ // ========
72
+ // JSON senders that set instrumentation_library_logs field MAY also set
73
+ // scope_logs to carry the same logs, 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_logs and
76
+ // SHOULD NOT set instrumentation_library_logs.
77
+ //
78
+ // JSON receivers SHOULD check if instrumentation_library_logs is set and
79
+ // scope_logs is not set then the value in instrumentation_library_logs
80
+ // SHOULD be used instead by converting InstrumentationLibraryLogs into ScopeLogs.
81
+ // If scope_logs is set then instrumentation_library_logs field SHOULD be ignored.
82
+ repeated InstrumentationLibraryLogs instrumentation_library_logs = 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_logs" field which have their own schema_url field.
86
+ string schema_url = 3;
87
+ }
32
88
 
33
- // A list of InstrumentationLibraryLogs that originate from a resource.
34
- repeated InstrumentationLibraryLogs instrumentation_library_logs = 2;
89
+ // A collection of Logs produced by a Scope.
90
+ message ScopeLogs {
91
+ // The instrumentation scope information for the logs 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 log records.
97
+ repeated LogRecord log_records = 2;
98
+
99
+ // This schema_url applies to all logs in the "logs" field.
100
+ string schema_url = 3;
35
101
  }
36
102
 
37
103
  // A collection of Logs produced by an InstrumentationLibrary.
104
+ // InstrumentationLibraryLogs is wire-compatible with ScopeLogs for binary
105
+ // Protobuf format.
106
+ // This message is deprecated and will be removed on June 15, 2022.
38
107
  message InstrumentationLibraryLogs {
39
- // The instrumentation library information for the logs in this message.
40
- // If this field is not set then no library info is known.
41
- opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1;
108
+ option deprecated = true;
109
+
110
+ // The instrumentation library information for the logs 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 logs that originate from an instrumentation library.
116
+ repeated LogRecord log_records = 2;
42
117
 
43
- // A list of log records.
44
- repeated LogRecord logs = 2;
118
+ // This schema_url applies to all logs in the "logs" field.
119
+ string schema_url = 3;
45
120
  }
46
121
 
47
122
  // Possible values for LogRecord.SeverityNumber.
48
123
  enum SeverityNumber {
49
- // UNSPECIFIED is the default SeverityNumber, it MUST not be used.
50
- SEVERITY_NUMBER_UNSPECIFIED = 0;
51
- SEVERITY_NUMBER_TRACE = 1;
52
- SEVERITY_NUMBER_TRACE2 = 2;
53
- SEVERITY_NUMBER_TRACE3 = 3;
54
- SEVERITY_NUMBER_TRACE4 = 4;
55
- SEVERITY_NUMBER_DEBUG = 5;
56
- SEVERITY_NUMBER_DEBUG2 = 6;
57
- SEVERITY_NUMBER_DEBUG3 = 7;
58
- SEVERITY_NUMBER_DEBUG4 = 8;
59
- SEVERITY_NUMBER_INFO = 9;
60
- SEVERITY_NUMBER_INFO2 = 10;
61
- SEVERITY_NUMBER_INFO3 = 11;
62
- SEVERITY_NUMBER_INFO4 = 12;
63
- SEVERITY_NUMBER_WARN = 13;
64
- SEVERITY_NUMBER_WARN2 = 14;
65
- SEVERITY_NUMBER_WARN3 = 15;
66
- SEVERITY_NUMBER_WARN4 = 16;
67
- SEVERITY_NUMBER_ERROR = 17;
68
- SEVERITY_NUMBER_ERROR2 = 18;
69
- SEVERITY_NUMBER_ERROR3 = 19;
70
- SEVERITY_NUMBER_ERROR4 = 20;
71
- SEVERITY_NUMBER_FATAL = 21;
72
- SEVERITY_NUMBER_FATAL2 = 22;
73
- SEVERITY_NUMBER_FATAL3 = 23;
74
- SEVERITY_NUMBER_FATAL4 = 24;
124
+ // UNSPECIFIED is the default SeverityNumber, it MUST NOT be used.
125
+ SEVERITY_NUMBER_UNSPECIFIED = 0;
126
+ SEVERITY_NUMBER_TRACE = 1;
127
+ SEVERITY_NUMBER_TRACE2 = 2;
128
+ SEVERITY_NUMBER_TRACE3 = 3;
129
+ SEVERITY_NUMBER_TRACE4 = 4;
130
+ SEVERITY_NUMBER_DEBUG = 5;
131
+ SEVERITY_NUMBER_DEBUG2 = 6;
132
+ SEVERITY_NUMBER_DEBUG3 = 7;
133
+ SEVERITY_NUMBER_DEBUG4 = 8;
134
+ SEVERITY_NUMBER_INFO = 9;
135
+ SEVERITY_NUMBER_INFO2 = 10;
136
+ SEVERITY_NUMBER_INFO3 = 11;
137
+ SEVERITY_NUMBER_INFO4 = 12;
138
+ SEVERITY_NUMBER_WARN = 13;
139
+ SEVERITY_NUMBER_WARN2 = 14;
140
+ SEVERITY_NUMBER_WARN3 = 15;
141
+ SEVERITY_NUMBER_WARN4 = 16;
142
+ SEVERITY_NUMBER_ERROR = 17;
143
+ SEVERITY_NUMBER_ERROR2 = 18;
144
+ SEVERITY_NUMBER_ERROR3 = 19;
145
+ SEVERITY_NUMBER_ERROR4 = 20;
146
+ SEVERITY_NUMBER_FATAL = 21;
147
+ SEVERITY_NUMBER_FATAL2 = 22;
148
+ SEVERITY_NUMBER_FATAL3 = 23;
149
+ SEVERITY_NUMBER_FATAL4 = 24;
75
150
  }
76
151
 
77
152
  // Masks for LogRecord.flags field.
78
153
  enum LogRecordFlags {
79
- LOG_RECORD_FLAG_UNSPECIFIED = 0;
80
- LOG_RECORD_FLAG_TRACE_FLAGS_MASK = 0x000000FF;
154
+ LOG_RECORD_FLAG_UNSPECIFIED = 0;
155
+ LOG_RECORD_FLAG_TRACE_FLAGS_MASK = 0x000000FF;
81
156
  }
82
157
 
83
158
  // A log record according to OpenTelemetry Log Data Model:
84
- // https://github.com/open-telemetry/oteps/blob/master/text/logs/0097-log-data-model.md
159
+ // https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md
85
160
  message LogRecord {
86
- // time_unix_nano is the time when the event occurred.
87
- // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
88
- // Value of 0 indicates unknown or missing timestamp.
89
- fixed64 time_unix_nano = 1;
90
-
91
- // Numerical value of the severity, normalized to values described in Log Data Model.
92
- // [Optional].
93
- SeverityNumber severity_number = 2;
94
-
95
- // The severity text (also known as log level). The original string representation as
96
- // it is known at the source. [Optional].
97
- string severity_text = 3;
98
-
99
- // Short event identifier that does not contain varying parts. Name describes
100
- // what happened (e.g. "ProcessStarted"). Recommended to be no longer than 50
101
- // characters. Not guaranteed to be unique in any way. [Optional].
102
- string name = 4;
103
-
104
- // A value containing the body of the log record. Can be for example a human-readable
105
- // string message (including multi-line) describing the event in a free form or it can
106
- // be a structured data composed of arrays and maps of other values. [Optional].
107
- opentelemetry.proto.common.v1.AnyValue body = 5;
108
-
109
- // Additional attributes that describe the specific event occurrence. [Optional].
110
- repeated opentelemetry.proto.common.v1.KeyValue attributes = 6;
111
- uint32 dropped_attributes_count = 7;
112
-
113
- // Flags, a bit field. 8 least significant bits are the trace flags as
114
- // defined in W3C Trace Context specification. 24 most significant bits are reserved
115
- // and must be set to 0. Readers must not assume that 24 most significant bits
116
- // will be zero and must correctly mask the bits when reading 8-bit trace flag (use
117
- // flags & TRACE_FLAGS_MASK). [Optional].
118
- fixed32 flags = 8;
119
-
120
- // A unique identifier for a trace. All logs from the same trace share
121
- // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes
122
- // is considered invalid. Can be set for logs that are part of request processing
123
- // and have an assigned trace id. [Optional].
124
- bytes trace_id = 9;
125
-
126
- // A unique identifier for a span within a trace, assigned when the span
127
- // is created. The ID is an 8-byte array. An ID with all zeroes is considered
128
- // invalid. Can be set for logs that are part of a particular processing span.
129
- // If span_id is present trace_id SHOULD be also present. [Optional].
130
- bytes span_id = 10;
161
+ reserved 4;
162
+
163
+ // time_unix_nano is the time when the event occurred.
164
+ // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
165
+ // Value of 0 indicates unknown or missing timestamp.
166
+ fixed64 time_unix_nano = 1;
167
+
168
+ // Time when the event was observed by the collection system.
169
+ // For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
170
+ // this timestamp is typically set at the generation time and is equal to Timestamp.
171
+ // For events originating externally and collected by OpenTelemetry (e.g. using
172
+ // Collector) this is the time when OpenTelemetry's code observed the event measured
173
+ // by the clock of the OpenTelemetry code. This field MUST be set once the event is
174
+ // observed by OpenTelemetry.
175
+ //
176
+ // For converting OpenTelemetry log data to formats that support only one timestamp or
177
+ // when receiving OpenTelemetry log data by recipients that support only one timestamp
178
+ // internally the following logic is recommended:
179
+ // - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
180
+ //
181
+ // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
182
+ // Value of 0 indicates unknown or missing timestamp.
183
+ fixed64 observed_time_unix_nano = 11;
184
+
185
+ // Numerical value of the severity, normalized to values described in Log Data Model.
186
+ // [Optional].
187
+ SeverityNumber severity_number = 2;
188
+
189
+ // The severity text (also known as log level). The original string representation as
190
+ // it is known at the source. [Optional].
191
+ string severity_text = 3;
192
+
193
+ // A value containing the body of the log record. Can be for example a human-readable
194
+ // string message (including multi-line) describing the event in a free form or it can
195
+ // be a structured data composed of arrays and maps of other values. [Optional].
196
+ opentelemetry.proto.common.v1.AnyValue body = 5;
197
+
198
+ // Additional attributes that describe the specific event occurrence. [Optional].
199
+ // Attribute keys MUST be unique (it is not allowed to have more than one
200
+ // attribute with the same key).
201
+ repeated opentelemetry.proto.common.v1.KeyValue attributes = 6;
202
+ uint32 dropped_attributes_count = 7;
203
+
204
+ // Flags, a bit field. 8 least significant bits are the trace flags as
205
+ // defined in W3C Trace Context specification. 24 most significant bits are reserved
206
+ // and must be set to 0. Readers must not assume that 24 most significant bits
207
+ // will be zero and must correctly mask the bits when reading 8-bit trace flag (use
208
+ // flags & TRACE_FLAGS_MASK). [Optional].
209
+ fixed32 flags = 8;
210
+
211
+ // A unique identifier for a trace. All logs from the same trace share
212
+ // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes
213
+ // is considered invalid. Can be set for logs that are part of request processing
214
+ // and have an assigned trace id. [Optional].
215
+ bytes trace_id = 9;
216
+
217
+ // A unique identifier for a span within a trace, assigned when the span
218
+ // is created. The ID is an 8-byte array. An ID with all zeroes is considered
219
+ // invalid. Can be set for logs that are part of a particular processing span.
220
+ // If span_id is present trace_id SHOULD be also present. [Optional].
221
+ bytes span_id = 10;
131
222
  }