class ElasticAPM::Instrumenter::Current

@api private

Public Class Methods

new() click to toggle source
# File lib/elastic_apm/instrumenter.rb, line 18
def initialize
  self.transaction = nil
  self.spans = []
end

Public Instance Methods

spans() click to toggle source
# File lib/elastic_apm/instrumenter.rb, line 31
def spans
  Thread.current[SPAN_KEY] ||= []
end
spans=(spans) click to toggle source
# File lib/elastic_apm/instrumenter.rb, line 35
def spans=(spans)
  Thread.current[SPAN_KEY] ||= []
  Thread.current[SPAN_KEY] = spans
end
transaction() click to toggle source
# File lib/elastic_apm/instrumenter.rb, line 23
def transaction
  Thread.current[TRANSACTION_KEY]
end
transaction=(transaction) click to toggle source
# File lib/elastic_apm/instrumenter.rb, line 27
def transaction=(transaction)
  Thread.current[TRANSACTION_KEY] = transaction
end