You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to use this process (https://docs.scoutapm.com/#ruby-custom-instrumentation) to instrument methods in an ActiveRecord model. These methods that I instrumented are used as callbacks like (before_save). Snippet that shows what I'm doing:
# frozen_string_literal: trueclassRecord < ApplicationRecordinclude ::ScoutApm::Tracerbefore_save:do_something_before_savedefdo_something_before_saveputs'doing something before save'endinstrument_method:do_something_before_saveend
What I'm noticing in traces on the web Scout UI is that it seems like this method is not grouped as a separate metric (I don't see any metrics for it at all). I was guessing it was being counted as ActiveRecord and under the call for Record.create! since it's called by ActiveRecord on our behalf.
Can anyone shed any light on what I might be doing wrong here? I would like to see the metric for this method separately and not counted inside the ActiveRecord category/call.
The text was updated successfully, but these errors were encountered:
I'm attempting to use this process (https://docs.scoutapm.com/#ruby-custom-instrumentation) to instrument methods in an
ActiveRecord
model. These methods that I instrumented are used as callbacks like (before_save
). Snippet that shows what I'm doing:What I'm noticing in traces on the web Scout UI is that it seems like this method is not grouped as a separate metric (I don't see any metrics for it at all). I was guessing it was being counted as
ActiveRecord
and under the call forRecord.create!
since it's called byActiveRecord
on our behalf.Can anyone shed any light on what I might be doing wrong here? I would like to see the metric for this method separately and not counted inside the
ActiveRecord
category/call.The text was updated successfully, but these errors were encountered: