Method: Sentry::Span#to_sentry_trace

Defined in:
lib/sentry/span.rb

#to_sentry_traceString

Generates a trace string that can be used to connect other transactions.

Returns:

  • (String)


154
155
156
157
158
159
# File 'lib/sentry/span.rb', line 154

def to_sentry_trace
  sampled_flag = ""
  sampled_flag = @sampled ? 1 : 0 unless @sampled.nil?

  "#{@trace_id}-#{@span_id}-#{sampled_flag}"
end