Creates a new child Span in the TraceT[F, A]
created by lifting this F[A]
, providing the capability
of annotating the span with notes based on the execution result of the F[A]
, using the
a custom Evaluator to determine success/failure of the F[A]
for the purposes of recording.
Creates a new child Span in the TraceT[F, A]
created by lifting this F[A]
, providing the capability
of annotating the span with notes based on the execution result of the F[A]
, using the
a custom Evaluator to determine success/failure of the F[A]
for the purposes of recording.
For example:
val io = IO(some computation) io.newAnnotatedSpan( Span.Name("query-products-for-sale", Note.string("sale-date", date.toString), Note.double("sale-max-price", 80.50) ) { case Right(saleProducts) => Vector(Note.string("sale-products", saleProducts.mkString(","))) }
- a descriptive name, emitted when the span is recorded.
- one or more Notes which annotate the span (often the input parameters to the F[A]
execution).
newTraceT - a new instance of TraceT
representing a child span.
Creates a new child Span in the TraceT[F, A]
created by lifting this F[A]
,
providing the capability of annotating the span with notes based on the execution result of the F[A]
,
using the default Evaluator to determine success/failure of the F[A]
for the purposes of span recording.
Creates a new child Span in the TraceT[F, A]
created by lifting this F[A]
,
providing the capability of annotating the span with notes based on the execution result of the F[A]
,
using the default Evaluator to determine success/failure of the F[A]
for the purposes of span recording.
For example:
val io = IO(some computation) io.newAnnotatedSpan( Span.Name("query-products-for-sale", Note.string("sale-date", date.toString), Note.double("sale-max-price", 80.50) ) { case Right(saleProducts) => Vector(Note.string("sale-products", saleProducts.mkString(","))) }
- a descriptive name, emitted when the span is recorded.
- one or more Notes which annotate the span (often the input parameters to the F[A]
execution).
newTraceT - a new instance of TraceT
representing a child span.
Creates a new child Span in the TraceT[F, A]
created by lifting this F[A]
, providing for custom
evaluation and rendering of the underlying F[A]
when recording the Span.
Creates a new child Span in the TraceT[F, A]
created by lifting this F[A]
, providing for custom
evaluation and rendering of the underlying F[A]
when recording the Span.
For example:
val io = IO(some computation) io.newSpan( Span.Name("query-products-for-sale", Evaluator.resultToFailure[Vector[Product] Note.string("sale-date", date.toString), Note.double("sale-max-price", 80.50) )
- a descriptive name, emitted when the span is recorded.
- an Evaluator which converts either a Throwable
or A
to an optional FailureDetail.
- one or more Notes which annotate the span (often the input parameters to the F[A]
execution).
newTraceT - a new instance of TraceT
representing a child span.
Creates a new child Span in the TraceT[F, A]
created by lifting this F[A]
, using the
default Evaluator to determine success/failure of the F[A]
for the purposes of span recording.
Creates a new child Span in the TraceT[F, A]
created by lifting this F[A]
, using the
default Evaluator to determine success/failure of the F[A]
for the purposes of span recording.
For example:
val io = IO(some computation) io.newSpan( Span.Name("query-products-for-sale", Note.string("sale-date", date.toString), Note.double("sale-max-price", 80.50) )
- a descriptive name, emitted when the span is recorded.
- one or more Notes which annotate the span (often the input parameters to the F[A]
execution).
a new instance of TraceT
representing a child span.
Lifts this program F
which computes A
into a TraceT[F, A]
context.
Lifts this program F
which computes A
into a TraceT[F, A]
context.
traceTOfA - a TraceT[F, A]
Lifts this F[A]
into a TraceT[F, A] and then transforms that
TraceT to an equivalent
TraceT[F, A] where
the passed-in function will be executed at the finish of the underlying effectful program.
Lifts this F[A]
into a TraceT[F, A] and then transforms that
TraceT to an equivalent
TraceT[F, A] where
the passed-in function will be executed at the finish of the underlying effectful program.
- a function which is passed an optional Throwable
- defined if the program failed and
returns a TraceT[F, Unit]
, a program run only for its effect.
a new TraceT[F, A]
with the error handling of the aforementioned f
function
parameter.
(Since version 1.5.0) use guaranteeCase on effect
(Since version ) see corresponding Javadoc for more information.
Provides the hooks by which the result of a effectful program can be converted into a
FailureDetail
for use in determining whether the program has failed for the purposes of the trace and how to render that failure. If the traced program fails, theexceptionToFailure
function is used to determine if this failure should be recorded as such for the span and if the program itself is successful, while theresultToFailure
function is used to determine if there is an application level failure embedded in the result and if so, how it should be rendered.The default evaluator for a span, if a custom one is not specified, is to treat a failures and successes at the effectful program-level as such for the span, converting the
Throwable
to a string with the stack trace.