Core.Telemetry.Events (ServCore v0.1.0)

Copy Markdown View Source

Telemetry event name constants and emit helpers for Elixir Server Core.

Events

EventEmitted when
[:core, :job, :start]A worker begins executing a job
[:core, :job, :stop]A job completes successfully
[:core, :job, :error]A job raises an exception

Attaching handlers

:telemetry.attach_many(
  "my-handler",
  [Core.Telemetry.Events.job_start(), Core.Telemetry.Events.job_stop()],
  &MyApp.Telemetry.handle_event/4,
  nil
)

Summary

Functions

Emit job_error. Called by the worker on exception.

Emit job_start. Called by the worker before performing work.

Emit job_stop. Called by the worker on success.

Functions

emit_job_error(job_id, duration_native, error_message)

Emit job_error. Called by the worker on exception.

emit_job_start(job_id, attempt, payload)

Emit job_start. Called by the worker before performing work.

emit_job_stop(job_id, duration_native)

Emit job_stop. Called by the worker on success.

job_error()

job_start()

job_stop()