Class: Labkit::Tracing::JaegerFactory
- Inherits:
-
Object
- Object
- Labkit::Tracing::JaegerFactory
- Defined in:
- lib/labkit/tracing/jaeger_factory.rb
Constant Summary collapse
- DEFAULT_PROBABILISTIC_RATE =
When the probabilistic sampler is used, by default 0.1% of requests will be traced
0.001
- DEFAULT_UDP_PORT =
The default port for the Jaeger agent UDP listener
6831
- FLUSH_INTERVAL =
Reduce this from default of 10 seconds as the Ruby jaeger client doesn’t have overflow control, leading to very large messages which fail to send over UDP (max packet = 64k) Flush more often, with smaller packets
5
Class Method Summary collapse
Class Method Details
.create_tracer(service_name, options) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/labkit/tracing/jaeger_factory.rb', line 20 def self.create_tracer(service_name, ) kwargs = { service_name: service_name, sampler: get_sampler([:sampler], [:sampler_param]), reporter: get_reporter(service_name, [:http_endpoint], [:udp_endpoint]) } .compact extra_params = .except(:sampler, :sampler_param, :http_endpoint, :udp_endpoint, :strict_parsing, :debug) if extra_params.present? = "jaeger tracer: invalid option: #{extra_params.keys.join(', ')}" raise if [:strict_parsing] warn end Jaeger::Client.build(kwargs) end |