@@ -79,6 +79,13 @@ pub struct LogRecord {
79
79
/// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
80
80
/// Value of 0 indicates unknown or missing timestamp.
81
81
#[ prost( fixed64, tag = "1" ) ]
82
+ #[ cfg_attr(
83
+ feature = "with-serde" ,
84
+ serde(
85
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
86
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
87
+ )
88
+ ) ]
82
89
pub time_unix_nano : u64 ,
83
90
/// Time when the event was observed by the collection system.
84
91
/// For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
@@ -96,6 +103,13 @@ pub struct LogRecord {
96
103
/// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
97
104
/// Value of 0 indicates unknown or missing timestamp.
98
105
#[ prost( fixed64, tag = "11" ) ]
106
+ #[ cfg_attr(
107
+ feature = "with-serde" ,
108
+ serde(
109
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
110
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
111
+ )
112
+ ) ]
99
113
pub observed_time_unix_nano : u64 ,
100
114
/// Numerical value of the severity, normalized to values described in Log Data Model.
101
115
/// \[Optional\].
@@ -136,6 +150,13 @@ pub struct LogRecord {
136
150
/// - the field is not present,
137
151
/// - the field contains an invalid value.
138
152
#[ prost( bytes = "vec" , tag = "9" ) ]
153
+ #[ cfg_attr(
154
+ feature = "with-serde" ,
155
+ serde(
156
+ serialize_with = "crate::proto::serializers::serialize_to_hex_string" ,
157
+ deserialize_with = "crate::proto::serializers::deserialize_from_hex_string"
158
+ )
159
+ ) ]
139
160
pub trace_id : :: prost:: alloc:: vec:: Vec < u8 > ,
140
161
/// A unique identifier for a span within a trace, assigned when the span
141
162
/// is created. The ID is an 8-byte array. An ID with all zeroes OR of length
@@ -150,6 +171,13 @@ pub struct LogRecord {
150
171
/// - the field is not present,
151
172
/// - the field contains an invalid value.
152
173
#[ prost( bytes = "vec" , tag = "10" ) ]
174
+ #[ cfg_attr(
175
+ feature = "with-serde" ,
176
+ serde(
177
+ serialize_with = "crate::proto::serializers::serialize_to_hex_string" ,
178
+ deserialize_with = "crate::proto::serializers::deserialize_from_hex_string"
179
+ )
180
+ ) ]
153
181
pub span_id : :: prost:: alloc:: vec:: Vec < u8 > ,
154
182
}
155
183
/// Possible values for LogRecord.SeverityNumber.
0 commit comments