Skip to content

Instantly share code, notes, and snippets.

@kenichi
Created August 11, 2017 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenichi/cb8f071d8faacd5809f74bde6454d840 to your computer and use it in GitHub Desktop.
Save kenichi/cb8f071d8faacd5809f74bde6454d840 to your computer and use it in GitHub Desktop.
possible more insight into Grape::Middleware::Formatter
module Grape
module Middleware
class Formatter < Base
include ::NewRelic::Agent::MethodTracer
[ :build_formatted_response,
:fetch_formatter,
:ensure_content_type
].each do |meth|
add_method_tracer :fetch_formatter, "Grape/Middleware/Formatter/#{meth}"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment