HoneylixirTracing.start_span

You're seeing just the function start_span, go back to HoneylixirTracing module for more information.
Link to this function

start_span(propagation_or_name, name_or_fields)

View Source (since 0.3.0)

Specs

start_span(HoneylixirTracing.Propagation.t() | nil, String.t()) ::
  {:ok, HoneylixirTracing.Span.t() | nil}
start_span(String.t(), Honeylixir.Event.fields_map()) ::
  {:ok, HoneylixirTracing.Span.t() | nil}

Start a span and manage ending it yourself.

See start_span/3.

Link to this function

start_span(propagation, name, fields)

View Source (since 0.3.0)

Specs

Start a span and manage ending it yourself.

Functionally looks and behaves much like the span functions. It accepts some combination of a propagation context, a span name, and a set of fields to start a span. The result is a tuple of :ok and whatever the previous current span was. You can use this in an end_span/1 call to set the current span back to what it used to be.

Every usage of start_span MUST have an end_span call or you may end up with unfinished spans or traces or other unexpected and undesirable results, such as a current span that lives longer than it should. If you can, try to store the previous span somewhere you can use to reset the current span. It is recommended you only use this in cases where this is impossible since in those places you could probably use a function in the span family instead. A common example for using this is using :telemetry events as spans when those events only give a duration rather than at least a start time.