File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
sentry-rails/lib/sentry/rails/log_subscribers Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ class ActionControllerSubscriber < Sentry::Rails::LogSubscriber
2828 # @param event [ActiveSupport::Notifications::Event] The controller action event
2929 def process_action ( event )
3030 payload = event . payload
31- duration = event . duration . round ( 2 )
3231
3332 controller = payload [ :controller ]
3433 action = payload [ :action ]
@@ -39,7 +38,7 @@ def process_action(event)
3938 controller : controller ,
4039 action : action ,
4140 status : status ,
42- duration_ms : duration ,
41+ duration_ms : duration_ms ( event ) ,
4342 method : payload [ :method ] ,
4443 path : payload [ :path ] ,
4544 format : payload [ :format ]
Original file line number Diff line number Diff line change @@ -27,12 +27,12 @@ class ActionMailerSubscriber < Sentry::Rails::LogSubscriber
2727 # @param event [ActiveSupport::Notifications::Event] The email delivery event
2828 def deliver ( event )
2929 payload = event . payload
30+
3031 mailer = payload [ :mailer ]
31- duration = duration_ms ( event )
3232
3333 attributes = {
3434 mailer : mailer ,
35- duration_ms : duration ,
35+ duration_ms : duration_ms ( event ) ,
3636 perform_deliveries : payload [ :perform_deliveries ]
3737 }
3838
Original file line number Diff line number Diff line change @@ -37,13 +37,12 @@ def sql(event)
3737 # Rails 5.0.0 doesn't include :cached in the payload, it was added in Rails 5.1
3838 cached = event . payload . fetch ( :cached , false )
3939 connection_id = event . payload [ :connection_id ]
40- duration = duration_ms ( event )
4140
4241 db_config = extract_db_config ( event . payload )
4342
4443 attributes = {
4544 sql : sql ,
46- duration_ms : duration ,
45+ duration_ms : duration_ms ( event ) ,
4746 cached : cached
4847 }
4948
You can’t perform that action at this time.
0 commit comments