Lifts this F[A]
into a TraceT[F, A] and then transforms that
TraceT to an equivalent
TraceT[F, A] where
a best-effort will be made to execute the passed-in function on the finish of the underlying effectful program.
The function can't be guaranteed to run in the face of interrupts, etc. It depends on the nature of the effectful program
itself.
Lifts this F[A]
into a TraceT[F, A] and then transforms that
TraceT to an equivalent
TraceT[F, A] where
a best-effort will be made to execute the passed-in function on the finish of the underlying effectful program.
The function can't be guaranteed to run in the face of interrupts, etc. It depends on the nature of the effectful program
itself.
- 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.
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
a best-effort will be made to execute the passed-in function on the finish of the underlying effectful program.
The function can't be guaranteed to run in the face of interrupts, etc. It depends on the nature of the effectful program
itself.
Lifts this F[A]
into a TraceT[F, A] and then transforms that
TraceT to an equivalent
TraceT[F, A] where
a best-effort will be made to execute the passed-in function on the finish of the underlying effectful program.
The function can't be guaranteed to run in the face of interrupts, etc. It depends on the nature of the effectful program
itself.
- 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.
(traceEnrichedEffect: TraceEnrichedEffect[[A]TraceEnrichedEffect[F, A], A]).bestEffortOnFinish(f)(F)
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.
(traceEnrichedEffect: TraceEnrichedEffect[[A]TraceEnrichedEffect[F, A], A]).newAnnotatedSpan(spanName, evaluator, notes)(resultAnnotator)(F)
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.
(traceEnrichedEffect: TraceEnrichedEffect[[A]TraceEnrichedEffect[F, A], A]).newAnnotatedSpan(spanName, notes)(resultAnnotator)(F)
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.
(traceEnrichedEffect: TraceEnrichedEffect[[A]TraceEnrichedEffect[F, A], A]).newSpan(spanName, evaluator, notes)(F)
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.
(traceEnrichedEffect: TraceEnrichedEffect[[A]TraceEnrichedEffect[F, A], A]).newSpan(spanName, notes)(F)
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]
(traceEnrichedEffect: TraceEnrichedEffect[[A]TraceEnrichedEffect[F, A], A]).toTraceT
Enriches an effectful program
F[A]
such that TraceT instance methods are made available on it, given the appropriate typeclasses in implicit scope.