Sha256: b6be82048b4fae74be6a776b42c1d3e589c320fed7ad3869ed3c729d440d55e2

Contents?: true

Size: 401 Bytes

Versions: 12

Compression:

Stored size: 401 Bytes

Contents

module Skylight
  class Middleware

    def self.new(app, instrumenter, *)
      return app unless instrumenter
      super
    end

    def initialize(app, instrumenter)
      @app = app
      @instrumenter = instrumenter
    end

    def call(env)
      @instrumenter.trace("Rack") do |trace|
        trace.root 'app.rack.request' do
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
skylight-0.1.5.alpha2 lib/skylight/middleware.rb
skylight-0.1.5.alpha1 lib/skylight/middleware.rb
skylight-0.1.4 lib/skylight/middleware.rb
skylight-0.1.4.alpha3 lib/skylight/middleware.rb
skylight-0.1.4.alpha2 lib/skylight/middleware.rb
skylight-0.1.4.alpha1 lib/skylight/middleware.rb
skylight-0.1.3 lib/skylight/middleware.rb
skylight-0.1.2 lib/skylight/middleware.rb
skylight-0.1.1 lib/skylight/middleware.rb
skylight-0.1.0 lib/skylight/middleware.rb
skylight-0.1.0.alpha2 lib/skylight/middleware.rb
skylight-0.1.0.alpha1 lib/skylight/middleware.rb