class Faraday::Request::Instrumentation

Middleware for instrumenting Requests.

def call(env)

Parameters:
  • env (Faraday::Env) --
def call(env)
  @instrumenter.instrument(@name, env) do
    @app.call(env)
  end
end

def initialize(app, options = nil)

Options Hash: (**options)
  • :instrumenter (Class) --
  • :name (String) --

Parameters:
  • options (nil, Hash) -- Options hash
  • app (#call) --

Other tags:
    Example: Using ActiveSupport::Notifications to measure time spent -
def initialize(app, options = nil)
  super(app)
  @name, @instrumenter = Options.from(options)
                                .values_at(:name, :instrumenter)
end