Class: SplunkTracing::GlobalTracer

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

Overview

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

You should access it via ‘SplunkTracing.instance`.

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/splunktracing/global_tracer.rb', line 17

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

  self.configured = true
  super
end