@@ -26,6 +26,7 @@ pub struct MetricsData {
26
26
#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
27
27
#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
28
28
#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
29
+ #[ cfg_attr( feature = "with-serde" , serde( default ) ) ]
29
30
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
30
31
pub struct ResourceMetrics {
31
32
/// The resource for the metrics in this message.
@@ -47,6 +48,7 @@ pub struct ResourceMetrics {
47
48
#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
48
49
#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
49
50
#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
51
+ #[ cfg_attr( feature = "with-serde" , serde( default ) ) ]
50
52
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
51
53
pub struct ScopeMetrics {
52
54
/// The instrumentation scope information for the metrics in this message.
@@ -152,6 +154,7 @@ pub struct ScopeMetrics {
152
154
#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
153
155
#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
154
156
#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
157
+ #[ cfg_attr( feature = "with-serde" , serde( default ) ) ]
155
158
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
156
159
pub struct Metric {
157
160
/// name of the metric.
@@ -214,6 +217,7 @@ pub mod metric {
214
217
#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
215
218
#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
216
219
#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
220
+ #[ cfg_attr( feature = "with-serde" , serde( default ) ) ]
217
221
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
218
222
pub struct Gauge {
219
223
#[ prost( message, repeated, tag = "1" ) ]
@@ -224,6 +228,7 @@ pub struct Gauge {
224
228
#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
225
229
#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
226
230
#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
231
+ #[ cfg_attr( feature = "with-serde" , serde( default ) ) ]
227
232
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
228
233
pub struct Sum {
229
234
#[ prost( message, repeated, tag = "1" ) ]
@@ -241,6 +246,7 @@ pub struct Sum {
241
246
#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
242
247
#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
243
248
#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
249
+ #[ cfg_attr( feature = "with-serde" , serde( default ) ) ]
244
250
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
245
251
pub struct Histogram {
246
252
#[ prost( message, repeated, tag = "1" ) ]
@@ -255,6 +261,7 @@ pub struct Histogram {
255
261
#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
256
262
#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
257
263
#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
264
+ #[ cfg_attr( feature = "with-serde" , serde( default ) ) ]
258
265
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
259
266
pub struct ExponentialHistogram {
260
267
#[ prost( message, repeated, tag = "1" ) ]
@@ -273,6 +280,7 @@ pub struct ExponentialHistogram {
273
280
#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
274
281
#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
275
282
#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
283
+ #[ cfg_attr( feature = "with-serde" , serde( default ) ) ]
276
284
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
277
285
pub struct Summary {
278
286
#[ prost( message, repeated, tag = "1" ) ]
@@ -283,6 +291,7 @@ pub struct Summary {
283
291
#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
284
292
#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
285
293
#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
294
+ #[ cfg_attr( feature = "with-serde" , serde( default ) ) ]
286
295
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
287
296
pub struct NumberDataPoint {
288
297
/// The set of key/value pairs that uniquely identify the timeseries from
@@ -360,6 +369,7 @@ pub mod number_data_point {
360
369
#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
361
370
#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
362
371
#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
372
+ #[ cfg_attr( feature = "with-serde" , serde( default ) ) ]
363
373
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
364
374
pub struct HistogramDataPoint {
365
375
/// The set of key/value pairs that uniquely identify the timeseries from
@@ -676,11 +686,25 @@ pub struct Exemplar {
676
686
/// span_id may be missing if the measurement is not recorded inside a trace
677
687
/// or if the trace is not sampled.
678
688
#[ prost( bytes = "vec" , tag = "4" ) ]
689
+ #[ cfg_attr(
690
+ feature = "with-serde" ,
691
+ serde(
692
+ serialize_with = "crate::proto::serializers::serialize_to_hex_string" ,
693
+ deserialize_with = "crate::proto::serializers::deserialize_from_hex_string"
694
+ )
695
+ ) ]
679
696
pub span_id : :: prost:: alloc:: vec:: Vec < u8 > ,
680
697
/// (Optional) Trace ID of the exemplar trace.
681
698
/// trace_id may be missing if the measurement is not recorded inside a trace
682
699
/// or if the trace is not sampled.
683
700
#[ prost( bytes = "vec" , tag = "5" ) ]
701
+ #[ cfg_attr(
702
+ feature = "with-serde" ,
703
+ serde(
704
+ serialize_with = "crate::proto::serializers::serialize_to_hex_string" ,
705
+ deserialize_with = "crate::proto::serializers::deserialize_from_hex_string"
706
+ )
707
+ ) ]
684
708
pub trace_id : :: prost:: alloc:: vec:: Vec < u8 > ,
685
709
/// The value of the measurement that was recorded. An exemplar is
686
710
/// considered invalid when one of the recognized value fields is not present
0 commit comments