View Source Guesswork.Telemetry.QuerySpan (Guesswork v0.8.0)
Represents a span within a query run.
Summary
Functions
Returns a key used for storage in ets.
Takes a query span, the duration
of the span, and the final error, then
completes the record by calculating and inserting the end_time
and duration
.
duration
is assumed to be :native
unix times.
Takes a query span, the duration
of the span, and the final metadata, then
completes the record by calculating and inserting the end_time
and duration
.
duration
is assumed to be :native
unix times.
Attempts to build a new query run entry using the needed id, context, type, and
the start time provided by telemetry (assumes a :native
unix time).
Types
@type t() :: %Guesswork.Telemetry.QuerySpan{ ctx: term(), duration_ms: integer() | nil, end_time: DateTime.t() | nil, error: nil | term(), metadata: metadata() | nil, query_id: String.t(), start_time: DateTime.t(), type: atom() }
Functions
Returns a key used for storage in ets.
Takes a query span, the duration
of the span, and the final error, then
completes the record by calculating and inserting the end_time
and duration
.
duration
is assumed to be :native
unix times.
Takes a query span, the duration
of the span, and the final metadata, then
completes the record by calculating and inserting the end_time
and duration
.
duration
is assumed to be :native
unix times.
Attempts to build a new query run entry using the needed id, context, type, and
the start time provided by telemetry (assumes a :native
unix time).