class HeimdallApm::Elasticsearch::Subscriber

Public Instance Methods

finish(name, id, payload) click to toggle source
# File lib/heimdall_apm/instruments/elasticsearch.rb, line 12
def finish(name, id, payload)
  txn = ::HeimdallApm::TransactionManager.current
  txn.stop_segment
end
start(name, id, payload) click to toggle source
# File lib/heimdall_apm/instruments/elasticsearch.rb, line 4
def start(name, id, payload)
  txn     = ::HeimdallApm::TransactionManager.current
  segment = ::HeimdallApm::Segment.new('Elastic'.freeze, name)
  segment.data = payload[:search]

  txn.start_segment(segment)
end