ScoutApm.Internal.JobRecord (scout_apm v2.0.0)

Copy Markdown

Stores a single or multiple runs of a background job. Both metadata ("queue" and "name"), and metrics ("total time", "metrics")

Summary

Functions

Given a Job layer (probably the root-layer of a TrackedRequest), turn it into a JobRecord, with fully populated metrics and timing info

Types

t()

@type t() :: %ScoutApm.Internal.JobRecord{
  count: non_neg_integer(),
  errors: non_neg_integer(),
  exclusive_time: ApproximateHistogram.t(),
  metrics: ScoutApm.MetricSet.t(),
  name: String.t(),
  queue: String.t(),
  total_time: ApproximateHistogram.t()
}

Functions

from_layer(layer, scope)

@spec from_layer(ScoutApm.Internal.Layer.t(), any()) :: t()

Given a Job layer (probably the root-layer of a TrackedRequest), turn it into a JobRecord, with fully populated metrics and timing info

increment_errors(record)

key(job_record)

@spec key(t()) :: String.t()

merge(m1, m2)

@spec merge(t(), t()) :: t()