module Oboe::Grape::Endpoint
Public Class Methods
included(klass)
click to toggle source
# File lib/oboe/frameworks/grape.rb, line 19 def self.included(klass) ::Oboe::Util.method_alias(klass, :run, ::Grape::Endpoint) end
Public Instance Methods
run_with_oboe(env)
click to toggle source
# File lib/oboe/frameworks/grape.rb, line 23 def run_with_oboe(env) if Oboe.tracing? report_kvs = {} report_kvs[:Controller] = self.class report_kvs[:Action] = env['PATH_INFO'] # Fall back to the raw tracing API so we can pass KVs # back on exit (a limitation of the Oboe::API.trace # block method) This removes the need for an info # event to send additonal KVs ::Oboe::API.log_entry('grape', {}) begin run_without_oboe(env) ensure ::Oboe::API.log_exit('grape', report_kvs) end else run_without_oboe(env) end end