lib/heroku_metal.rb in oboe-heroku-0.8.0.1 vs lib/heroku_metal.rb in oboe-heroku-0.8.0.9
- old
+ new
@@ -52,33 +52,25 @@
def always?
Oboe::Config[:tracing_mode].to_s == "always"
end
- def continue?
- Oboe::Context.isValid and not Oboe.never?
- end
-
def never?
Oboe::Config[:tracing_mode].to_s == "never"
end
- def now?
- Oboe::Context.isValid and not Oboe.never?
- end
-
def passthrough?
["always", "through"].include?(Oboe::Config[:tracing_mode])
end
- def sample?
- Oboe::Context.sampleRequest('', '', '')
+ def sample?(opts = {})
+ # Assure defaults since SWIG enforces Strings
+ opts[:layer] ||= ''
+ opts[:xtrace] ||= ''
+ opts['X-TV-Meta'] ||= ''
+ Oboe::Context.sampleRequest(opts[:layer], opts[:xtrace], opts['X-TV-Meta'])
end
- def start?
- not Oboe::Context.isValid and Oboe.always?
- end
-
def through?
Oboe::Config[:tracing_mode] == "through"
end
def tracing?