class ElasticAPM::Instrumenter::Current

@api private

Public Class Methods

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

Public Instance Methods

spans() click to toggle source
# File lib/elastic_apm/instrumenter.rb, line 49
def spans
  Thread.current[SPAN_KEY] ||= []
end
spans=(spans) click to toggle source
# File lib/elastic_apm/instrumenter.rb, line 53
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 41
def transaction
  Thread.current[TRANSACTION_KEY]
end
transaction=(transaction) click to toggle source
# File lib/elastic_apm/instrumenter.rb, line 45
def transaction=(transaction)
  Thread.current[TRANSACTION_KEY] = transaction
end