@@ -166,6 +166,13 @@ pub struct Span {
166
166
///
167
167
/// This field is semantically required and it is expected that end_time >= start_time.
168
168
#[ prost( fixed64, tag = "7" ) ]
169
+ #[ cfg_attr(
170
+ feature = "with-serde" ,
171
+ serde(
172
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
173
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
174
+ )
175
+ ) ]
169
176
pub start_time_unix_nano : u64 ,
170
177
/// end_time_unix_nano is the end time of the span. On the client side, this is the time
171
178
/// kept by the local machine where the span execution ends. On the server side, this
@@ -174,6 +181,13 @@ pub struct Span {
174
181
///
175
182
/// This field is semantically required and it is expected that end_time >= start_time.
176
183
#[ prost( fixed64, tag = "8" ) ]
184
+ #[ cfg_attr(
185
+ feature = "with-serde" ,
186
+ serde(
187
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
188
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
189
+ )
190
+ ) ]
177
191
pub end_time_unix_nano : u64 ,
178
192
/// attributes is a collection of key/value pairs. Note, global attributes
179
193
/// like server name can be set using the resource API. Examples of attributes:
@@ -227,6 +241,13 @@ pub mod span {
227
241
pub struct Event {
228
242
/// time_unix_nano is the time the event occurred.
229
243
#[ prost( fixed64, tag = "1" ) ]
244
+ #[ cfg_attr(
245
+ feature = "with-serde" ,
246
+ serde(
247
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
248
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
249
+ )
250
+ ) ]
230
251
pub time_unix_nano : u64 ,
231
252
/// name of the event.
232
253
/// This field is semantically required to be set to non-empty string.
0 commit comments