Loader.Telemetry (loader v0.3.1)

Telemetry integration.

Unless specified, all times are in :native units.

Loader executes the following events:

load-profile-execution-start

Load Profile Execution Start

[:loader, :load_profile_execution, :start] - emitted when Loader.execute/2 is called.

Measurements

Metadata

  • :instance_name - the :name used to start the root supervisor for Loader
  • :load_profile - profile (Loader.LoadProfile)
  • :scheduled_loader_ref - (almost) unique reference generated for the process that is handling execution of the profile. Generated with make_ref/0
  • :work_spec - specification for each task to be executed (Loader.WorkSpec)

load-profile-execution-stop

Load Profile Execution Stop

[:loader, :load_profile_execution, :stop] - emitted when a LoadProfile has been fully executed, regardless of the number of successes or failures of individual tasks

Measurements

  • :duration - time elapsed since the load profile execution start event

Metadata

  • :failures - number of tasks deemed unsuccessful, based on the WorkSpec
  • :instance_name - the :name used to start the root supervisor for Loader
  • :load_profile - profile (Loader.LoadProfile)
  • :scheduled_loader_ref - (almost) unique reference generated for the process that handled execution of the profile. Generated with make_ref/0
  • :successes - number of tasks deemed successful, based on the WorkSpec
  • :work_spec - specification for each task to be executed (Loader.WorkSpec)

task-start

Task Start

[:loader, :task, :start] - emitted when the :task callback from a Loader.WorkSpec is invoked

Measurements

  • :monotonic_time - system monotonic time, as reported by :erlang.monotonic_time/0 (see the :telemetry docs span/3 function for more details)
  • :system_time - system time, as reported by :erlang.system_time/0 (see the :telemetry docs span/3 function for more details)

Metadata

  • :instance_name - the :name used to start the root supervisor for Loader
  • :scheduled_loader_ref - (almost) unique reference generated for the process that handled execution of the profile. Generated with make_ref/0
  • :telemetry_span_context - (almost) unique reference generated for the span execution
  • :work_spec - specification for the task (Loader.WorkSpec)

task-stop

Task Stop

[:loader, :task, :stop] - emitted when the :task callback from a Loader.WorkSpec is invoked

Measurements

  • :monotonic_time - system monotonic time, as reported by :erlang.monotonic_time/0 (see the :telemetry docs span/3 function for more details)
  • :system_time - system time, as reported by :erlang.system_time/0 (see the :telemetry docs span/3 function for more details)

Metadata

  • :instance_name - the :name used to start the root supervisor for Loader
  • :scheduled_loader_ref - (almost) unique reference generated for the process that handled execution of the profile. Generated with make_ref/0
  • :telemetry_span_context - (almost) unique reference generated for the span execution
  • :was_success? - whether or not the task was successful, according to the WorkSpec
  • :work_spec - specification for the task (Loader.WorkSpec)

task-exception

Task Exception

[:loader, :task, :exception] - emitted if there is an uncaught exception while invoking the :task callback from a Loader.WorkSpec

Measurements

  • :monotonic_time - system monotonic time, as reported by :erlang.monotonic_time/0 (see the :telemetry docs span/3 function for more details)
  • :system_time - system time, as reported by :erlang.system_time/0 (see the :telemetry docs span/3 function for more details)

Metadata

  • :instance_name - the :name used to start the root supervisor for Loader
  • :kind - the type of exception
  • :reason - whatever reason is given by the exception
  • :scheduled_loader_ref - (almost) unique reference generated for the process that handled execution of the profile. Generated with make_ref/0
  • :stacktrace - the stacktrace of the exception
  • :telemetry_span_context - (almost) unique reference generated for the span execution
  • :work_spec - specification for the task (Loader.WorkSpec)