class ScoutApm::SlowJobRecord
Attributes
allocation_metrics[R]
allocations[R]
context[R]
What else interesting did we learn?
exclusive_time[R]
git_sha[R]
hostname[R]
job_name[R]
mem_delta[R]
metrics[R]
queue_name[R]
score[R]
seconds_since_startup[R]
span_trace[R]
time[R]
When did this job occur
total_call_time[R]
total_time[R]
truncated_metrics[R]
Public Class Methods
new(agent_context, queue_name, job_name, time, total_time, exclusive_time, context, metrics, allocation_metrics, mem_delta, allocations, score, truncated_metrics, span_trace)
click to toggle source
# File lib/scout_apm/slow_job_record.rb, line 28 def initialize(agent_context, queue_name, job_name, time, total_time, exclusive_time, context, metrics, allocation_metrics, mem_delta, allocations, score, truncated_metrics, span_trace) @queue_name = queue_name @job_name = job_name @time = time @total_time = total_time @exclusive_time = exclusive_time @context = context @metrics = metrics @allocation_metrics = allocation_metrics @mem_delta = mem_delta @allocations = allocations @seconds_since_startup = (Time.now - agent_context.process_start_time) @hostname = agent_context.environment.hostname @git_sha = agent_context.environment.git_revision.sha @score = score @truncated_metrics = truncated_metrics @span_trace = span_trace agent_context.logger.debug { "Slow Job [#{metric_name}] - Call Time: #{total_call_time} Mem Delta: #{mem_delta}"} end
Public Instance Methods
call()
click to toggle source
Scorable interface
Needed so we can merge ScoredItemSet
instances
# File lib/scout_apm/slow_job_record.rb, line 58 def call self end
metric_name()
click to toggle source
# File lib/scout_apm/slow_job_record.rb, line 50 def metric_name "Job/#{queue_name}/#{job_name}" end
name()
click to toggle source
# File lib/scout_apm/slow_job_record.rb, line 62 def name metric_name end