ScoutApm.Internal.Layer (scout_apm v2.0.0)

Copy Markdown

Internal to the ScoutAPM agent.

Represents a single layer during a TrackedRequest

Summary

Types

t()

@type t() :: %ScoutApm.Internal.Layer{
  backtrace: nil | [any()],
  children: [
    %ScoutApm.Internal.Layer{
      backtrace: term(),
      children: term(),
      db_command: term(),
      db_rows: term(),
      desc: term(),
      http_method: term(),
      http_status_code: term(),
      http_url: term(),
      manual_duration: term(),
      name: term(),
      scopable: term(),
      started_at: term(),
      stopped_at: term(),
      type: term(),
      uri: term()
    }
  ],
  db_command: nil | String.t(),
  db_rows: nil | non_neg_integer(),
  desc: nil | String.t(),
  http_method: nil | String.t(),
  http_status_code: nil | non_neg_integer(),
  http_url: nil | String.t(),
  manual_duration: nil | ScoutApm.Internal.Duration.t(),
  name: nil | String.t(),
  scopable: boolean(),
  started_at: number(),
  stopped_at: nil | Integer,
  type: String.t(),
  uri: nil | String.t()
}

Functions

new(data)

@spec new(map()) :: t()

set_manual_duration(layer, duration)

total_child_time(layer)

total_exclusive_time(layer)

total_time(layer)

update_backtrace(layer, backtrace)

update_children(layer, children)

update_db_command(layer, db_command)

update_db_rows(layer, db_rows)

update_desc(layer, desc)

update_fields(layer, fields)

update_http_method(layer, http_method)

update_http_status_code(layer, http_status_code)

update_http_url(layer, http_url)

update_name(layer, name)

update_stopped_at(layer)

update_stopped_at(layer, stopped_at)

update_uri(layer, uri)