Skip to content

Commit

Permalink
Make span_id generation consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
sl0thentr0py committed Aug 2, 2023
1 parent 84d95ba commit 9c833b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sentry-ruby/lib/sentry/span.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def initialize(
timestamp: nil
)
@trace_id = trace_id || SecureRandom.uuid.delete("-")
@span_id = span_id || SecureRandom.hex(8)
@span_id = span_id || SecureRandom.uuid.delete("-").slice(0, 16)
@parent_span_id = parent_span_id
@sampled = sampled
@start_timestamp = start_timestamp || Sentry.utc_now.to_f
Expand Down

0 comments on commit 9c833b5

Please sign in to comment.