Class: LightStep::GlobalTracer

Inherits:
Tracer
  • Object
show all
Includes:
Singleton
Defined in:
lib/lightstep/global_tracer.rb

Overview

GlobalTracer is a singleton version of the LightStep::Tracer.

You should access it via ‘LightStep.instance`.

Constant Summary

Constants inherited from Tracer

Tracer::DEFAULT_MAX_LOG_RECORDS, Tracer::DEFAULT_MAX_SPAN_RECORDS, Tracer::MIN_MAX_LOG_RECORDS, Tracer::MIN_MAX_SPAN_RECORDS

Instance Attribute Summary

Attributes inherited from Tracer

#access_token, #guid

Instance Method Summary collapse

Methods inherited from Tracer

#active_span, #disable, #enable, #enabled?, #extract, #finish_span, #flush, #inject, #max_log_records, #max_log_records=, #max_span_records, #max_span_records=, #report_period_seconds=, #scope_manager, #start_active_span, #start_span

Instance Method Details

#configure(**options) ⇒ Object

Configure the GlobalTracer See Tracer#initialize



17
18
19
20
21
22
23
24
25
26
# File 'lib/lightstep/global_tracer.rb', line 17

def configure(**options)
  if configured
    LightStep.logger.warn "[LightStep] Already configured"
    LightStep.logger.info "Stack trace:\n\t#{caller.join("\n\t")}"
    return
  end

  self.configured = true
  super
end