1
1
// DO NOT EDIT.
2
2
// swift-format-ignore-file
3
+ // swiftlint:disable all
3
4
//
4
5
// Generated by the Swift generator plugin for the protocol buffer compiler.
5
6
// Source: opentelemetry/proto/logs/v1/logs.proto
@@ -35,7 +36,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
35
36
}
36
37
37
38
/// Possible values for LogRecord.SeverityNumber.
38
- public enum Opentelemetry_Proto_Logs_V1_SeverityNumber : SwiftProtobuf . Enum {
39
+ public enum Opentelemetry_Proto_Logs_V1_SeverityNumber : SwiftProtobuf . Enum , Swift . CaseIterable {
39
40
public typealias RawValue = Int
40
41
41
42
/// UNSPECIFIED is the default SeverityNumber, it MUST NOT be used.
@@ -132,13 +133,8 @@ public enum Opentelemetry_Proto_Logs_V1_SeverityNumber: SwiftProtobuf.Enum {
132
133
}
133
134
}
134
135
135
- }
136
-
137
- #if swift(>=4.2)
138
-
139
- extension Opentelemetry_Proto_Logs_V1_SeverityNumber : CaseIterable {
140
136
// The compiler won't synthesize support with the UNRECOGNIZED case.
141
- public static var allCases : [ Opentelemetry_Proto_Logs_V1_SeverityNumber ] = [
137
+ public static let allCases : [ Opentelemetry_Proto_Logs_V1_SeverityNumber ] = [
142
138
. unspecified,
143
139
. trace,
144
140
. trace2,
@@ -165,16 +161,17 @@ extension Opentelemetry_Proto_Logs_V1_SeverityNumber: CaseIterable {
165
161
. fatal3,
166
162
. fatal4,
167
163
]
168
- }
169
164
170
- #endif // swift(>=4.2)
165
+ }
171
166
172
- /// LogRecordFlags is defined as a protobuf 'uint32' type and is to be used as
173
- /// bit-fields. Each non-zero value defined in this enum is a bit-mask.
174
- /// To extract the bit-field, for example, use an expression like:
167
+ /// LogRecordFlags represents constants used to interpret the
168
+ /// LogRecord.flags field, which is protobuf 'fixed32' type and is to
169
+ /// be used as bit-fields. Each non-zero value defined in this enum is
170
+ /// a bit-mask. To extract the bit-field, for example, use an
171
+ /// expression like:
175
172
///
176
173
/// (logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK)
177
- public enum Opentelemetry_Proto_Logs_V1_LogRecordFlags : SwiftProtobuf . Enum {
174
+ public enum Opentelemetry_Proto_Logs_V1_LogRecordFlags : SwiftProtobuf . Enum , Swift . CaseIterable {
178
175
public typealias RawValue = Int
179
176
180
177
/// The zero value for the enum. Should not be used for comparisons.
@@ -205,19 +202,13 @@ public enum Opentelemetry_Proto_Logs_V1_LogRecordFlags: SwiftProtobuf.Enum {
205
202
}
206
203
}
207
204
208
- }
209
-
210
- #if swift(>=4.2)
211
-
212
- extension Opentelemetry_Proto_Logs_V1_LogRecordFlags : CaseIterable {
213
205
// The compiler won't synthesize support with the UNRECOGNIZED case.
214
- public static var allCases : [ Opentelemetry_Proto_Logs_V1_LogRecordFlags ] = [
206
+ public static let allCases : [ Opentelemetry_Proto_Logs_V1_LogRecordFlags ] = [
215
207
. doNotUse,
216
208
. traceFlagsMask,
217
209
]
218
- }
219
210
220
- #endif // swift(>=4.2)
211
+ }
221
212
222
213
/// LogsData represents the logs data that can be stored in a persistent storage,
223
214
/// OR can be embedded by other protocols that transfer OTLP logs data but do not
@@ -229,7 +220,7 @@ extension Opentelemetry_Proto_Logs_V1_LogRecordFlags: CaseIterable {
229
220
///
230
221
/// When new fields are added into this message, the OTLP request MUST be updated
231
222
/// as well.
232
- public struct Opentelemetry_Proto_Logs_V1_LogsData {
223
+ public struct Opentelemetry_Proto_Logs_V1_LogsData : Sendable {
233
224
// SwiftProtobuf.Message conformance is added in an extension below. See the
234
225
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
235
226
// methods supported on all messages.
@@ -247,7 +238,7 @@ public struct Opentelemetry_Proto_Logs_V1_LogsData {
247
238
}
248
239
249
240
/// A collection of ScopeLogs from a Resource.
250
- public struct Opentelemetry_Proto_Logs_V1_ResourceLogs {
241
+ public struct Opentelemetry_Proto_Logs_V1_ResourceLogs : Sendable {
251
242
// SwiftProtobuf.Message conformance is added in an extension below. See the
252
243
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
253
244
// methods supported on all messages.
@@ -266,6 +257,10 @@ public struct Opentelemetry_Proto_Logs_V1_ResourceLogs {
266
257
/// A list of ScopeLogs that originate from a resource.
267
258
public var scopeLogs : [ Opentelemetry_Proto_Logs_V1_ScopeLogs ] = [ ]
268
259
260
+ /// The Schema URL, if known. This is the identifier of the Schema that the resource data
261
+ /// is recorded in. Notably, the last part of the URL path is the version number of the
262
+ /// schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
263
+ /// https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
269
264
/// This schema_url applies to the data in the "resource" field. It does not apply
270
265
/// to the data in the "scope_logs" field which have their own schema_url field.
271
266
public var schemaURL : String = String ( )
@@ -278,7 +273,7 @@ public struct Opentelemetry_Proto_Logs_V1_ResourceLogs {
278
273
}
279
274
280
275
/// A collection of Logs produced by a Scope.
281
- public struct Opentelemetry_Proto_Logs_V1_ScopeLogs {
276
+ public struct Opentelemetry_Proto_Logs_V1_ScopeLogs : Sendable {
282
277
// SwiftProtobuf.Message conformance is added in an extension below. See the
283
278
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
284
279
// methods supported on all messages.
@@ -298,6 +293,10 @@ public struct Opentelemetry_Proto_Logs_V1_ScopeLogs {
298
293
/// A list of log records.
299
294
public var logRecords : [ Opentelemetry_Proto_Logs_V1_LogRecord ] = [ ]
300
295
296
+ /// The Schema URL, if known. This is the identifier of the Schema that the log data
297
+ /// is recorded in. Notably, the last part of the URL path is the version number of the
298
+ /// schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
299
+ /// https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
301
300
/// This schema_url applies to all logs in the "logs" field.
302
301
public var schemaURL : String = String ( )
303
302
@@ -310,7 +309,7 @@ public struct Opentelemetry_Proto_Logs_V1_ScopeLogs {
310
309
311
310
/// A log record according to OpenTelemetry Log Data Model:
312
311
/// https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md
313
- public struct Opentelemetry_Proto_Logs_V1_LogRecord {
312
+ public struct Opentelemetry_Proto_Logs_V1_LogRecord : @ unchecked Sendable {
314
313
// SwiftProtobuf.Message conformance is added in an extension below. See the
315
314
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
316
315
// methods supported on all messages.
@@ -398,22 +397,27 @@ public struct Opentelemetry_Proto_Logs_V1_LogRecord {
398
397
/// - the field contains an invalid value.
399
398
public var spanID : Data = Data ( )
400
399
400
+ /// A unique identifier of event category/type.
401
+ /// All events with the same event_name are expected to conform to the same
402
+ /// schema for both their attributes and their body.
403
+ ///
404
+ /// Recommended to be fully qualified and short (no longer than 256 characters).
405
+ ///
406
+ /// Presence of event_name on the log record identifies this record
407
+ /// as an event.
408
+ ///
409
+ /// [Optional].
410
+ ///
411
+ /// Status: [Development]
412
+ public var eventName : String = String ( )
413
+
401
414
public var unknownFields = SwiftProtobuf . UnknownStorage ( )
402
415
403
416
public init ( ) { }
404
417
405
418
fileprivate var _body : Opentelemetry_Proto_Common_V1_AnyValue ? = nil
406
419
}
407
420
408
- #if swift(>=5.5) && canImport(_Concurrency)
409
- extension Opentelemetry_Proto_Logs_V1_SeverityNumber : @unchecked Sendable { }
410
- extension Opentelemetry_Proto_Logs_V1_LogRecordFlags : @unchecked Sendable { }
411
- extension Opentelemetry_Proto_Logs_V1_LogsData : @unchecked Sendable { }
412
- extension Opentelemetry_Proto_Logs_V1_ResourceLogs : @unchecked Sendable { }
413
- extension Opentelemetry_Proto_Logs_V1_ScopeLogs : @unchecked Sendable { }
414
- extension Opentelemetry_Proto_Logs_V1_LogRecord : @unchecked Sendable { }
415
- #endif // swift(>=5.5) && canImport(_Concurrency)
416
-
417
421
// MARK: - Code below here is support for the SwiftProtobuf runtime.
418
422
419
423
fileprivate let _protobuf_package = " opentelemetry.proto.logs.v1 "
@@ -596,6 +600,7 @@ extension Opentelemetry_Proto_Logs_V1_LogRecord: SwiftProtobuf.Message, SwiftPro
596
600
8 : . same( proto: " flags " ) ,
597
601
9 : . standard( proto: " trace_id " ) ,
598
602
10 : . standard( proto: " span_id " ) ,
603
+ 12 : . standard( proto: " event_name " ) ,
599
604
]
600
605
601
606
public mutating func decodeMessage< D: SwiftProtobuf . Decoder > ( decoder: inout D ) throws {
@@ -614,6 +619,7 @@ extension Opentelemetry_Proto_Logs_V1_LogRecord: SwiftProtobuf.Message, SwiftPro
614
619
case 9 : try { try decoder. decodeSingularBytesField ( value: & self . traceID) } ( )
615
620
case 10 : try { try decoder. decodeSingularBytesField ( value: & self . spanID) } ( )
616
621
case 11 : try { try decoder. decodeSingularFixed64Field ( value: & self . observedTimeUnixNano) } ( )
622
+ case 12 : try { try decoder. decodeSingularStringField ( value: & self . eventName) } ( )
617
623
default : break
618
624
}
619
625
}
@@ -654,6 +660,9 @@ extension Opentelemetry_Proto_Logs_V1_LogRecord: SwiftProtobuf.Message, SwiftPro
654
660
if self . observedTimeUnixNano != 0 {
655
661
try visitor. visitSingularFixed64Field ( value: self . observedTimeUnixNano, fieldNumber: 11 )
656
662
}
663
+ if !self . eventName. isEmpty {
664
+ try visitor. visitSingularStringField ( value: self . eventName, fieldNumber: 12 )
665
+ }
657
666
try unknownFields. traverse ( visitor: & visitor)
658
667
}
659
668
@@ -668,6 +677,7 @@ extension Opentelemetry_Proto_Logs_V1_LogRecord: SwiftProtobuf.Message, SwiftPro
668
677
if lhs. flags != rhs. flags { return false }
669
678
if lhs. traceID != rhs. traceID { return false }
670
679
if lhs. spanID != rhs. spanID { return false }
680
+ if lhs. eventName != rhs. eventName { return false }
671
681
if lhs. unknownFields != rhs. unknownFields { return false }
672
682
return true
673
683
}
0 commit comments