@@ -26,106 +26,107 @@ option go_package = "github.com/open-telemetry/opentelemetry-proto/gen/go/logs/v
26
26
27
27
// A collection of InstrumentationLibraryLogs from a Resource.
28
28
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 ;
29
+ // The resource for the logs in this message.
30
+ // If this field is not set then resource info is unknown .
31
+ opentelemetry.proto.resource.v1.Resource resource = 1 ;
32
32
33
- // A list of InstrumentationLibraryLogs that originate from a resource.
34
- repeated InstrumentationLibraryLogs instrumentation_library_logs = 2 ;
33
+ // A list of InstrumentationLibraryLogs that originate from a resource.
34
+ repeated InstrumentationLibraryLogs instrumentation_library_logs = 2 ;
35
35
}
36
36
37
37
// A collection of Logs produced by an InstrumentationLibrary.
38
38
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 ;
39
+ // The instrumentation library information for the logs in this message.
40
+ // Semantically when InstrumentationLibrary isn't set, it is equivalent with
41
+ // an empty instrumentation library name (unknown).
42
+ opentelemetry.proto.common.v1.InstrumentationLibrary instrumentation_library = 1 ;
42
43
43
- // A list of log records.
44
- repeated LogRecord logs = 2 ;
44
+ // A list of log records.
45
+ repeated LogRecord logs = 2 ;
45
46
}
46
47
47
48
// Possible values for LogRecord.SeverityNumber.
48
49
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 ;
50
+ // UNSPECIFIED is the default SeverityNumber, it MUST NOT be used.
51
+ SEVERITY_NUMBER_UNSPECIFIED = 0 ;
52
+ SEVERITY_NUMBER_TRACE = 1 ;
53
+ SEVERITY_NUMBER_TRACE2 = 2 ;
54
+ SEVERITY_NUMBER_TRACE3 = 3 ;
55
+ SEVERITY_NUMBER_TRACE4 = 4 ;
56
+ SEVERITY_NUMBER_DEBUG = 5 ;
57
+ SEVERITY_NUMBER_DEBUG2 = 6 ;
58
+ SEVERITY_NUMBER_DEBUG3 = 7 ;
59
+ SEVERITY_NUMBER_DEBUG4 = 8 ;
60
+ SEVERITY_NUMBER_INFO = 9 ;
61
+ SEVERITY_NUMBER_INFO2 = 10 ;
62
+ SEVERITY_NUMBER_INFO3 = 11 ;
63
+ SEVERITY_NUMBER_INFO4 = 12 ;
64
+ SEVERITY_NUMBER_WARN = 13 ;
65
+ SEVERITY_NUMBER_WARN2 = 14 ;
66
+ SEVERITY_NUMBER_WARN3 = 15 ;
67
+ SEVERITY_NUMBER_WARN4 = 16 ;
68
+ SEVERITY_NUMBER_ERROR = 17 ;
69
+ SEVERITY_NUMBER_ERROR2 = 18 ;
70
+ SEVERITY_NUMBER_ERROR3 = 19 ;
71
+ SEVERITY_NUMBER_ERROR4 = 20 ;
72
+ SEVERITY_NUMBER_FATAL = 21 ;
73
+ SEVERITY_NUMBER_FATAL2 = 22 ;
74
+ SEVERITY_NUMBER_FATAL3 = 23 ;
75
+ SEVERITY_NUMBER_FATAL4 = 24 ;
75
76
}
76
77
77
78
// Masks for LogRecord.flags field.
78
79
enum LogRecordFlags {
79
- LOG_RECORD_FLAG_UNSPECIFIED = 0 ;
80
- LOG_RECORD_FLAG_TRACE_FLAGS_MASK = 0x000000FF ;
80
+ LOG_RECORD_FLAG_UNSPECIFIED = 0 ;
81
+ LOG_RECORD_FLAG_TRACE_FLAGS_MASK = 0x000000FF ;
81
82
}
82
83
83
84
// A log record according to OpenTelemetry Log Data Model:
84
85
// https://github.com/open-telemetry/oteps/blob/master/text/logs/0097-log-data-model.md
85
86
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 ;
87
+ // time_unix_nano is the time when the event occurred.
88
+ // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
89
+ // Value of 0 indicates unknown or missing timestamp.
90
+ fixed64 time_unix_nano = 1 ;
91
+
92
+ // Numerical value of the severity, normalized to values described in Log Data Model.
93
+ // [Optional].
94
+ SeverityNumber severity_number = 2 ;
95
+
96
+ // The severity text (also known as log level). The original string representation as
97
+ // it is known at the source. [Optional].
98
+ string severity_text = 3 ;
99
+
100
+ // Short event identifier that does not contain varying parts. Name describes
101
+ // what happened (e.g. "ProcessStarted"). Recommended to be no longer than 50
102
+ // characters. Not guaranteed to be unique in any way. [Optional].
103
+ string name = 4 ;
104
+
105
+ // A value containing the body of the log record. Can be for example a human-readable
106
+ // string message (including multi-line) describing the event in a free form or it can
107
+ // be a structured data composed of arrays and maps of other values. [Optional].
108
+ opentelemetry.proto.common.v1.AnyValue body = 5 ;
109
+
110
+ // Additional attributes that describe the specific event occurrence. [Optional].
111
+ repeated opentelemetry.proto.common.v1.KeyValue attributes = 6 ;
112
+ uint32 dropped_attributes_count = 7 ;
113
+
114
+ // Flags, a bit field. 8 least significant bits are the trace flags as
115
+ // defined in W3C Trace Context specification. 24 most significant bits are reserved
116
+ // and must be set to 0. Readers must not assume that 24 most significant bits
117
+ // will be zero and must correctly mask the bits when reading 8-bit trace flag (use
118
+ // flags & TRACE_FLAGS_MASK). [Optional].
119
+ fixed32 flags = 8 ;
120
+
121
+ // A unique identifier for a trace. All logs from the same trace share
122
+ // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes
123
+ // is considered invalid. Can be set for logs that are part of request processing
124
+ // and have an assigned trace id. [Optional].
125
+ bytes trace_id = 9 ;
126
+
127
+ // A unique identifier for a span within a trace, assigned when the span
128
+ // is created. The ID is an 8-byte array. An ID with all zeroes is considered
129
+ // invalid. Can be set for logs that are part of a particular processing span.
130
+ // If span_id is present trace_id SHOULD be also present. [Optional].
131
+ bytes span_id = 10 ;
131
132
}
0 commit comments