Sha256: 6d7a2e385b65af3905ae0c9d3f7aaa6a93e9a1124f74787fefb6cc89998ff3d4

Contents?: true

Size: 360 Bytes

Versions: 10

Compression:

Stored size: 360 Bytes

Contents

require_relative 'base'

module RequestTracer
  module Integration
    class RackHandler
      include Base
      def initialize(app, config={})
        @app = app
        @tracer = config[:tracer] || Trace
      end
      def call(env)
        @tracer.push(extract_fields_from_headers(env)) do
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
request-tracer-0.7.0 lib/request_tracer/integration/rack_handler.rb
request-tracer-0.6.6 lib/request_tracer/integration/rack_handler.rb
request-tracer-0.6.5 lib/request_tracer/integration/rack_handler.rb
request-tracer-0.6.4 lib/request_tracer/integration/rack_handler.rb
request-tracer-0.6.3 lib/request_tracer/integration/rack_handler.rb
request-tracer-0.6.2 lib/request_tracer/integration/rack_handler.rb
request-tracer-0.6.1 lib/request_tracer/integration/rack_handler.rb
request-tracer-0.5.8 lib/request_tracer/integration/rack_handler.rb
request-tracer-0.5.6 lib/request_tracer/integration/rack_handler.rb
request-tracer-0.5.5 lib/request_tracer/integration/rack_handler.rb