Sha256: 44f8b67bcb4f7ba89155f996f4342f66cc7ea13a45a22085424ff924848a17f4

Contents?: true

Size: 945 Bytes

Versions: 17

Compression:

Stored size: 945 Bytes

Contents

require 'airbrake/rack/user'
require 'airbrake/rack/user_filter'
require 'airbrake/rack/context_filter'
require 'airbrake/rack/session_filter'
require 'airbrake/rack/http_params_filter'
require 'airbrake/rack/http_headers_filter'
require 'airbrake/rack/request_body_filter'
require 'airbrake/rack/route_filter'
require 'airbrake/rack/middleware'
require 'airbrake/rack/request_store'
require 'airbrake/rack/instrumentable'

module Airbrake
  # Rack is a namespace for all Rack-related code.
  module Rack
    # @since v9.2.0
    # @api public
    def self.capture_timing(label)
      routes = Airbrake::Rack::RequestStore[:routes]
      if !routes || routes.none?
        result = yield
      else
        timed_trace = Airbrake::TimedTrace.span(label) do
          result = yield
        end

        routes.each do |_route_path, params|
          params[:groups].merge!(timed_trace.spans)
        end
      end

      result
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
airbrake-10.0.0 lib/airbrake/rack.rb
airbrake-9.5.5 lib/airbrake/rack.rb
airbrake-9.5.4 lib/airbrake/rack.rb
airbrake-9.5.3 lib/airbrake/rack.rb
airbrake-9.5.2 lib/airbrake/rack.rb
airbrake-9.5.1 lib/airbrake/rack.rb
airbrake-9.5.0 lib/airbrake/rack.rb
airbrake-9.4.5 lib/airbrake/rack.rb
airbrake-9.4.4 lib/airbrake/rack.rb
airbrake-9.4.3 lib/airbrake/rack.rb
airbrake-9.4.2 lib/airbrake/rack.rb
airbrake-9.4.1 lib/airbrake/rack.rb
airbrake-9.4.0 lib/airbrake/rack.rb
airbrake-9.3.0 lib/airbrake/rack.rb
airbrake-9.2.2 lib/airbrake/rack.rb
airbrake-9.2.1 lib/airbrake/rack.rb
airbrake-9.2.0 lib/airbrake/rack.rb