Module: ILove::Tracing::Client

Defined in:
lib/ilove/tracing/client.rb

Class Method Summary collapse

Class Method Details

.setup(cfg) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ilove/tracing/client.rb', line 4

def self.setup(cfg)
  case cfg.client
  when :jaeger
    require('jaeger/client') rescue raise("Add gem 'jaeger-client' to Gemfile")

    OpenTracing.global_tracer = Jaeger::Client.build(cfg.client_params)
  when :none
    nil
  when Symbol
    raise "Unknown client #{cfg.client}"
  else
    OpenTracing.global_tracer = cfg.client
  end
end