Class: Honeykiq::LibhoneySpan

Inherits:
Object
  • Object
show all
Defined in:
lib/honeykiq/libhoney_span.rb

Instance Method Summary collapse

Constructor Details

#initialize(libhoney) ⇒ LibhoneySpan

Returns a new instance of LibhoneySpan.



3
4
5
# File 'lib/honeykiq/libhoney_span.rb', line 3

def initialize(libhoney)
  @libhoney = libhoney
end

Instance Method Details

#callObject



7
8
9
10
11
12
13
# File 'lib/honeykiq/libhoney_span.rb', line 7

def call(*)
  libhoney.event.tap do |event|
    duration_ms(event) { yield event }
  ensure
    event.send
  end
end