Tapper v0.6.2 Tapper.Tracer.Trace.Convert View Source

Converts Trace to Protocol spans.

Link to this section Summary

Functions

calculate span duration.

convert an internal span to a protocol span, setting duration

convert an internal trace to a list of protocol spans

Link to this section Functions

Link to this function

span_duration(span, trace)

View Source

Specs

span_duration(
  span :: Tapper.Tracer.Trace.SpanInfo.t(),
  trace :: Tapper.Tracer.Trace.t()
) :: nil | pos_integer()

calculate span duration.

Handles special cases of:

Link to this function

to_protocol_span(span, trace)

View Source

convert an internal span to a protocol span, setting duration

Link to this function

to_protocol_spans(trace)

View Source

Specs

to_protocol_spans(Tapper.Tracer.Trace.t()) :: [
  %Tapper.Protocol.Span{
    annotations: term(),
    binary_annotations: term(),
    debug: term(),
    duration: term(),
    id: term(),
    name: term(),
    parent_id: term(),
    timestamp: term(),
    trace_id: term()
  }
]

convert an internal trace to a list of protocol spans