Skip to content

Commit

Permalink
mark optional SpanLink fields optional with #[serde(default)]
Browse files Browse the repository at this point in the history
  • Loading branch information
nhulston committed Feb 18, 2025
1 parent e57ee81 commit 32ed77c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions trace-protobuf/src/pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pub struct SpanLink {
///
/// Optional. The high 64 bits of a referenced trace id.
#[prost(uint64, tag = "2")]
#[serde(default)]
pub trace_id_high: u64,
/// @gotags: json:"span_id" msg:"span_id"
///
Expand All @@ -39,6 +40,7 @@ pub struct SpanLink {
///
/// Optional. Simple mapping of keys to string values.
#[prost(map = "string, string", tag = "4")]
#[serde(default)]
pub attributes: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
Expand All @@ -47,11 +49,13 @@ pub struct SpanLink {
///
/// Optional. W3C tracestate.
#[prost(string, tag = "5")]
#[serde(default)]
pub tracestate: ::prost::alloc::string::String,
/// @gotags: msg:"flags,omitempty"
///
/// Optional. W3C trace flags. If set, the high bit (bit 31) must be set.
#[prost(uint32, tag = "6")]
#[serde(default)]
pub flags: u32,
}
#[derive(Deserialize, Serialize)]
Expand Down

0 comments on commit 32ed77c

Please sign in to comment.