Method: HeimdallApm::Probe#instrument
- Defined in:
- lib/heimdall_apm/probe.rb
#instrument(type, name, opts = {}) ⇒ Object
Insruments block passed to the method into the current transaction.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/heimdall_apm/probe.rb', line 13 def instrument(type, name, opts = {}) txn = ::HeimdallApm::TransactionManager.current segment = ::HeimdallApm::Segment.new(type, name) txn.start_segment(segment) # TODO: maybe yield the segment here to have the block pass additional # informations yield ensure txn.stop_segment end |