Sha256: 4cdd962942008f840d94102397eb8d9f11989fa6faf5d23abbfbc8c3395828b6
Contents?: true
Size: 994 Bytes
Versions: 12
Compression:
Stored size: 994 Bytes
Contents
require "sentry/rails/tracing/abstract_subscriber" require "sentry/rails/instrument_payload_cleanup_helper" module Sentry module Rails module Tracing class ActionControllerSubscriber < AbstractSubscriber extend InstrumentPayloadCleanupHelper EVENT_NAME = "process_action.action_controller".freeze def self.subscribe! subscribe_to_event(EVENT_NAME) do |event_name, duration, payload| controller = payload[:controller] action = payload[:action] record_on_current_span( op: event_name, start_timestamp: payload[:start_timestamp], description: "#{controller}##{action}", duration: duration ) do |span| payload = payload.dup cleanup_data(payload) span.set_data(:payload, payload) span.set_http_status(payload[:status]) end end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems