ReleaseKit.Telemetry (ReleaseKit v0.3.1)

Copy Markdown

Emits and summarizes ReleaseKit artifact build telemetry.

Events use :telemetry span conventions. Each phase emits [:release_kit, :artifact, phase, :start] and either :stop or :exception with duration measurements in native time units.

Summary

Functions

Returns the supported telemetry option keys.

Runs a function inside a ReleaseKit telemetry span.

Runs a function inside a ReleaseKit telemetry span with extra stop metadata.

Runs a function with an optional timing summary attached to ReleaseKit events.

Types

options()

@type options() :: keyword()

phase()

@type phase() ::
  :build
  | :compile
  | :before_release
  | :assets
  | :release
  | :after_release
  | :package

Functions

option_keys()

@spec option_keys() :: [atom()]

Returns the supported telemetry option keys.

span(phase, metadata \\ %{}, fun)

@spec span(phase(), map(), (-> result)) :: result when result: term()

Runs a function inside a ReleaseKit telemetry span.

span_with_metadata(phase, metadata, fun)

@spec span_with_metadata(phase(), map(), (-> {result, map()})) :: result
when result: term()

Runs a function inside a ReleaseKit telemetry span with extra stop metadata.

with_summary(options, fun)

@spec with_summary(options(), (-> result)) :: result when result: term()

Runs a function with an optional timing summary attached to ReleaseKit events.