module SignalFx::Tracing::Instrumenter::RestClient
Public Class Methods
instrument(opts = {})
click to toggle source
# File lib/signalfx/tracing/instrumentation/restclient.rb, line 10 def instrument(opts = {}) begin require 'restclient' rescue LoadError return end begin require 'restclient/instrumentation' rescue LoadError => e puts e.message return end tracer = opts.fetch(:tracer, OpenTracing.global_tracer) propagate = opts.fetch(:propagate, false) ::RestClient::Instrumentation.instrument(tracer: tracer, propagate: propagate) if !@instrumented @instrumented = true end