You can instrument your Sinatra or Padrino app by adding the oboe gem to your Gemfile
, running bundle install
and adding the following code to your config.ru
. Make sure to set :tracing_mode
and :sample_rate
accordingly.
require 'oboe'
# When traces should be initiated for incoming requests. Valid options are
# “always,” “through” (when the request is initiated with a tracing header
# from upstream) and “never”. You must set this directive to “always” in
# order to initiate tracing.
Oboe::Config[:tracing_mode] = 'through'
# You can remove the following line in production to allow for
# auto sampling or managing the sample rate through the TraceView portal.
# Oboe::Config[:sample_rate] = 1000000
Oboe::Ruby.initialize
use Oboe::Rack
In a future release of Traceview, much of this will be automated.