Skip to content

Commit

Permalink
remove omitempty from SpanLink struct fields
Browse files Browse the repository at this point in the history
  • Loading branch information
nhulston committed Jan 27, 2025
1 parent 56510fc commit 72d9dbe
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 103 deletions.
8 changes: 4 additions & 4 deletions ddtrace/span_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ type SpanLink struct {
// TraceID represents the low 64 bits of the linked span's trace id. This field is required.
TraceID uint64 `msg:"trace_id" json:"trace_id"`
// TraceIDHigh represents the high 64 bits of the linked span's trace id. This field is only set if the linked span's trace id is 128 bits.
TraceIDHigh uint64 `msg:"trace_id_high,omitempty" json:"trace_id_high"`
TraceIDHigh uint64 `msg:"trace_id_high" json:"trace_id_high"`
// SpanID represents the linked span's span id.
SpanID uint64 `msg:"span_id" json:"span_id"`
// Attributes is a mapping of keys to string values. These values are used to add additional context to the span link.
Attributes map[string]string `msg:"attributes,omitempty" json:"attributes"`
Attributes map[string]string `msg:"attributes" json:"attributes"`
// Tracestate is the tracestate of the linked span. This field is optional.
Tracestate string `msg:"tracestate,omitempty" json:"tracestate"`
Tracestate string `msg:"tracestate" json:"tracestate"`
// Flags represents the W3C trace flags of the linked span. This field is optional.
Flags uint32 `msg:"flags,omitempty" json:"flags"`
Flags uint32 `msg:"flags" json:"flags"`
}
162 changes: 63 additions & 99 deletions ddtrace/span_link_msgp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 72d9dbe

Please sign in to comment.