Module: RequestTracer
- Defined in:
- lib/request_tracer.rb,
lib/request_tracer/trace.rb,
lib/request_tracer/version.rb,
lib/request_tracer/integration/base.rb,
lib/request_tracer/integration/rack_handler.rb,
lib/request_tracer/integration/sidekiq_handler.rb,
lib/request_tracer/integration/rest_client_handler.rb
Defined Under Namespace
Modules: Integration, Trace
Classes: DefaultTracer, NullTracer
Constant Summary
collapse
- B3_REQUIRED_FIELDS =
%w(trace_id parent_span_id span_id)
- B3_REQUIRED_FIELDS_FROM_SHORT_NAMES =
B3_REQUIRED_FIELDS.map {|f| [f.gsub("_", ""), f] }.to_h
B3_REQUIRED_FIELDS.map {|f| "HTTP_X_B3_#{f.gsub("_", "").upcase}" }
B3_REQUIRED_FIELDS.zip().to_h
.zip(B3_REQUIRED_FIELDS).to_h
%w[HTTP_X_B3_FLAGS]
- VERSION =
"0.6.4"
Class Method Summary
collapse
Class Method Details
.integrate_with(*services) ⇒ Object
11
12
13
14
15
16
17
18
|
# File 'lib/request_tracer.rb', line 11
def self.integrate_with(*services)
services.each do |service|
require_relative "request_tracer/integration/#{service}_handler"
class_name = service.to_s.split('_').collect(&:capitalize).join + 'Handler'
integration_module = RequestTracer::Integration.const_get(class_name)
integration_module.activate
end
end
|
.latest_trace_hash(*args) ⇒ Object
20
21
22
|
# File 'lib/request_tracer.rb', line 20
def self.latest_trace_hash(*args)
Trace.latest.to_h
end
|