Sha256: f6bad7893b5ba273e5ed4f4cda12c019bce23ddc0a672a7f3e77b90b4dcdbc9b

Contents?: true

Size: 678 Bytes

Versions: 7

Compression:

Stored size: 678 Bytes

Contents

module Skylight
  module Normalizers
    module Coach
      class MiddlewareFinish < Normalizer
        register "coach.middleware.finish"

        CAT = "app.coach.middleware".freeze

        # See information on the events Coach emits here:
        # https://github.com/gocardless/coach#instrumentation

        # Called whenever a new middleware is executed. We can expect this to happen
        # within a Coach::Handler.
        #
        # We can expect the payload to have the :middleware key.
        def normalize(trace, name, payload)
          trace.endpoint = payload[:middleware]
          [ CAT, payload[:middleware], nil ]
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
skylight-1.7.2 lib/skylight/normalizers/coach/middleware_finish.rb
skylight-1.7.1 lib/skylight/normalizers/coach/middleware_finish.rb
skylight-1.7.0 lib/skylight/normalizers/coach/middleware_finish.rb
skylight-1.6.1 lib/skylight/normalizers/coach/middleware_finish.rb
skylight-1.6.0 lib/skylight/normalizers/coach/middleware_finish.rb
skylight-1.5.1 lib/skylight/normalizers/coach/middleware_finish.rb
skylight-1.5.0 lib/skylight/normalizers/coach/middleware_finish.rb