Sha256: 9133475107aa113f109f47cff3498737922fbc10eed09a6f8cf88180a90c8b12

Contents?: true

Size: 681 Bytes

Versions: 1

Compression:

Stored size: 681 Bytes

Contents

module Skylight
  module Normalizers
    module ActionDispatch
      class RouteSet < Normalizer
        register "route_set.action_dispatch"

        CAT = "rack.app".freeze

        def normalize(trace, _name, _payload)
          trace.endpoint = router_class_name
          [CAT, trace.endpoint, nil]
        end

        private

          def router_class_name
            "ActionDispatch::Routing::RouteSet"
          end

          def process_meta_options(_payload)
            # provide hints to override default source_location behavior
            super.merge(source_location: [:own_instance_method, router_class_name, "call"])
          end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
skylight-5.0.0.beta lib/skylight/normalizers/action_dispatch/route_set.rb