package skadi
- Alphabetic
- Public
- Protected
Type Members
- trait Context extends AnyRef
Opaque value encapsulated inside of
Span
.Opaque value encapsulated inside of
Span
. Completely implementation-dependent and usually exposed to user on application boundaries to run traces across processes. - trait HasSpan[Env] extends AnyRef
Type class to describe how to extract & set span for some environment (i.e.
Type class to describe how to extract & set span for some environment (i.e.
Kleisli
argument orState
's state) - trait Span extends AnyRef
Basic interface for span.
Basic interface for span. Details are implementation-dependent, but all implementations must be referentially-transparent on updating Span data
- trait StatefulTrace[F[_]] extends Trace[F]
Elaborate version of Trace that allows to safely set & modify running span inside of
F[_]
.Elaborate version of Trace that allows to safely set & modify running span inside of
F[_]
.Examples of such effects:
monix.Task
withTaskLocal
,StateT
- sealed trait Tag extends AnyRef
Span tags
- trait Trace[F[_]] extends AnyRef
Type class that describes how to extract
Span
from the effectF[_]
and how to runF[A]
with given span - trait TraceCarrier[F[_], Carrier] extends AnyRef
Abstraction over extraction of span's context from some carrier (i.e.
Abstraction over extraction of span's context from some carrier (i.e. HTTP headers), as well as creating a carrier from the current span's context (if any).
Usually kept at the application boundaries to extract information from the input and continue trace by adding a child span, or to inject span into carrier and pass it further to another process
- case class TraceLog(timestamp: Instant, message: String) extends Product with Serializable
Trace log to add to span
Trace log to add to span
- timestamp
timestamp of the log
- message
log message
- trait Tracer[F[_]] extends AnyRef
Tracer acts as an abstraction layer over tracing.
Tracer acts as an abstraction layer over tracing.
General idea is to create span around
fa: F[A]
, evaluate the results ofF[A]
and report span to underlying tracing solution.Usage:
tracer.trace("fetch_user", "user_id" -> Tag.int(42)) { readFromDB(userId=42) } //the moment `readFromDB` is evaluated, span "fetch_user" is finished
- trait TracerClock[F[_]] extends AnyRef
Default JRE Clock from cats-effect can't work with precision less than milliseconds for wall-clock time, as it relies on
System.currentTimeMillis()