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