Class: ScoutApm::Utils::SpanId
- Inherits:
-
Object
- Object
- ScoutApm::Utils::SpanId
- Defined in:
- lib/scout_apm/utils/unique_id.rb
Overview
Represents a random ID that we can use to track a certain span. The ‘span` prefix is only for ease of reading logs - it should not be interpreted to convey any sort of meaning.
Instance Method Summary collapse
-
#initialize ⇒ SpanId
constructor
A new instance of SpanId.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ SpanId
Returns a new instance of SpanId.
32 33 34 |
# File 'lib/scout_apm/utils/unique_id.rb', line 32 def initialize @random = SecureRandom.hex(16) end |
Instance Method Details
#to_s ⇒ Object
36 37 38 |
# File 'lib/scout_apm/utils/unique_id.rb', line 36 def to_s "span-#{@random}" end |