@@ -431,6 +431,13 @@ pub struct HistogramDataPoint {
431
431
/// value must be equal to the sum of the "count" fields in buckets if a
432
432
/// histogram is provided.
433
433
#[ prost( fixed64, tag = "4" ) ]
434
+ #[ cfg_attr(
435
+ feature = "with-serde" ,
436
+ serde(
437
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
438
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
439
+ )
440
+ ) ]
434
441
pub count : u64 ,
435
442
/// sum of the values in the population. If count is zero then this field
436
443
/// must be zero.
@@ -450,6 +457,13 @@ pub struct HistogramDataPoint {
450
457
/// The number of elements in bucket_counts array must be by one greater than
451
458
/// the number of elements in explicit_bounds array.
452
459
#[ prost( fixed64, repeated, tag = "6" ) ]
460
+ #[ cfg_attr(
461
+ feature = "with-serde" ,
462
+ serde(
463
+ serialize_with = "crate::proto::serializers::serialize_vec_u64_to_strings" ,
464
+ deserialize_with = "crate::proto::serializers::deserialize_strings_to_vec_u64"
465
+ )
466
+ ) ]
453
467
pub bucket_counts : :: prost:: alloc:: vec:: Vec < u64 > ,
454
468
/// explicit_bounds specifies buckets with explicitly defined bounds for values.
455
469
///
@@ -503,17 +517,38 @@ pub struct ExponentialHistogramDataPoint {
503
517
/// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
504
518
/// 1970.
505
519
#[ prost( fixed64, tag = "2" ) ]
520
+ #[ cfg_attr(
521
+ feature = "with-serde" ,
522
+ serde(
523
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
524
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
525
+ )
526
+ ) ]
506
527
pub start_time_unix_nano : u64 ,
507
528
/// TimeUnixNano is required, see the detailed comments above Metric.
508
529
///
509
530
/// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
510
531
/// 1970.
511
532
#[ prost( fixed64, tag = "3" ) ]
533
+ #[ cfg_attr(
534
+ feature = "with-serde" ,
535
+ serde(
536
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
537
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
538
+ )
539
+ ) ]
512
540
pub time_unix_nano : u64 ,
513
541
/// count is the number of values in the population. Must be
514
542
/// non-negative. This value must be equal to the sum of the "bucket_counts"
515
543
/// values in the positive and negative Buckets plus the "zero_count" field.
516
544
#[ prost( fixed64, tag = "4" ) ]
545
+ #[ cfg_attr(
546
+ feature = "with-serde" ,
547
+ serde(
548
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
549
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
550
+ )
551
+ ) ]
517
552
pub count : u64 ,
518
553
/// sum of the values in the population. If count is zero then this field
519
554
/// must be zero.
@@ -551,6 +586,13 @@ pub struct ExponentialHistogramDataPoint {
551
586
/// Implementations MAY consider the zero bucket to have probability
552
587
/// mass equal to (zero_count / count).
553
588
#[ prost( fixed64, tag = "7" ) ]
589
+ #[ cfg_attr(
590
+ feature = "with-serde" ,
591
+ serde(
592
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
593
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
594
+ )
595
+ ) ]
554
596
pub zero_count : u64 ,
555
597
/// positive carries the positive range of exponential bucket counts.
556
598
#[ prost( message, optional, tag = "8" ) ]
@@ -628,15 +670,36 @@ pub struct SummaryDataPoint {
628
670
/// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
629
671
/// 1970.
630
672
#[ prost( fixed64, tag = "2" ) ]
673
+ #[ cfg_attr(
674
+ feature = "with-serde" ,
675
+ serde(
676
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
677
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
678
+ )
679
+ ) ]
631
680
pub start_time_unix_nano : u64 ,
632
681
/// TimeUnixNano is required, see the detailed comments above Metric.
633
682
///
634
683
/// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
635
684
/// 1970.
636
685
#[ prost( fixed64, tag = "3" ) ]
686
+ #[ cfg_attr(
687
+ feature = "with-serde" ,
688
+ serde(
689
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
690
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
691
+ )
692
+ ) ]
637
693
pub time_unix_nano : u64 ,
638
694
/// count is the number of values in the population. Must be non-negative.
639
695
#[ prost( fixed64, tag = "4" ) ]
696
+ #[ cfg_attr(
697
+ feature = "with-serde" ,
698
+ serde(
699
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
700
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
701
+ )
702
+ ) ]
640
703
pub count : u64 ,
641
704
/// sum of the values in the population. If count is zero then this field
642
705
/// must be zero.
@@ -704,6 +767,13 @@ pub struct Exemplar {
704
767
/// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
705
768
/// 1970.
706
769
#[ prost( fixed64, tag = "2" ) ]
770
+ #[ cfg_attr(
771
+ feature = "with-serde" ,
772
+ serde(
773
+ serialize_with = "crate::proto::serializers::serialize_u64_to_string" ,
774
+ deserialize_with = "crate::proto::serializers::deserialize_string_to_u64"
775
+ )
776
+ ) ]
707
777
pub time_unix_nano : u64 ,
708
778
/// (Optional) Span ID of the exemplar trace.
709
779
/// span_id may be missing if the measurement is not recorded inside a trace
0 commit comments