Sha256: 77d5790d21c9bda1dc8059bf148a331eb11430217564f970499afbf2463901ea

Contents?: true

Size: 489 Bytes

Versions: 4

Compression:

Stored size: 489 Bytes

Contents

require 'active_support/notifications'

ActiveSupport::Notifications.subscribe(/\.action_dispatch$/) do |event, started, finished, _, payload|
  req = payload[:request]
  payload = {
    path:           req.fullpath,
    ip:             req.remote_ip,
    method:         req.method,
    referer:        req.referer,
    content_length: req.content_length,
    user_agent:     req.user_agent
  }
  Vx::Lib::Instrumentation.delivery event, payload, event.split("."), started, finished
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vx-lib-instrumentation-0.1.12 lib/vx/lib/instrumentation/probe/action_dispatch.rb
vx-lib-instrumentation-0.1.11 lib/vx/lib/instrumentation/probe/action_dispatch.rb
vx-lib-instrumentation-0.1.10 lib/vx/lib/instrumentation/probe/action_dispatch.rb
vx-lib-instrumentation-0.1.9 lib/vx/lib/instrumentation/probe/action_dispatch.rb