Module: Dontbugme::Correlation
- Defined in:
- lib/dontbugme/correlation.rb
Constant Summary collapse
- KEY =
:dontbugme_correlation_id
Class Method Summary collapse
Class Method Details
.clear! ⇒ Object
20 21 22 |
# File 'lib/dontbugme/correlation.rb', line 20 def clear! Thread.current[KEY] = nil end |
.current ⇒ Object
8 9 10 |
# File 'lib/dontbugme/correlation.rb', line 8 def current Thread.current[KEY] end |
.current=(id) ⇒ Object
12 13 14 |
# File 'lib/dontbugme/correlation.rb', line 12 def current=(id) Thread.current[KEY] = id end |
.generate ⇒ Object
16 17 18 |
# File 'lib/dontbugme/correlation.rb', line 16 def generate "corr_#{SecureRandom.hex(8)}" end |