Skip to content

Commit

Permalink
fix: sampling decision set in span links
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdinur committed Apr 17, 2024
1 parent 7c46b99 commit 32b7a27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/datadog/tracing/span_link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def initialize(
)
@span_id = digest&.span_id
@trace_id = digest&.trace_id
@trace_flags = digest&.trace_flags
@trace_flags = digest&.trace_sampling_priority && digest&.trace_sampling_priority > 0 ? 1 : 0
@trace_state = digest&.trace_state && digest&.trace_state.dup
@dropped_attributes = 0
@attributes = (attributes && attributes.dup) || {}
Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/tracing/span_link_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Datadog::Tracing::TraceDigest.new(
span_id: span_id,
trace_id: trace_id,
trace_flags: trace_flags,
trace_sampling_priority: trace_flags,
trace_state: trace_state,
)
end
Expand Down

0 comments on commit 32b7a27

Please sign in to comment.