TraceResourceLifecycleOps

com.dwolla.tracing.syntax.TraceResourceLifecycleOps
final class TraceResourceLifecycleOps[F[_], A](val resource: Resource[F, A]) extends AnyVal

Attributes

Source
TraceResourceLifecycleOps.scala
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def traceResourceLifecycleAs(name: String)(implicit F: MonadCancelThrow[F], T: Trace[F]): Resource[F, A]

Wrap the acquisition and release phases of the given Resource[F, A] in children spans of the given Trace[F].

Wrap the acquisition and release phases of the given Resource[F, A] in children spans of the given Trace[F].

Note: this requires a Trace[F] built from Local[F, Span[F]] (e.g. using natchez.mtl.natchezMtlTraceForLocal) or Trace[Kleisli[F, Span[F], *]]. Notably, the natchez.Trace.ioTrace instance is *not* compatible with this method.

Value parameters

F

a MonadCancelThrow[F] instance for the given effect type

T

a Trace[F] for the given effect type. See the note in the description above; not every Trace[F] instance will work

name

the base of the span name to use for acquisition (the finalization span will append ".finalize" to this value to form its span name)

Attributes

Returns

the input Resource[F, A] with its acquisition and release phases wrapped in Natchez spans

Source
TraceResourceLifecycleOps.scala
def traceResourceLifecycleInRootSpans(name: String, entryPoint: EntryPoint[F])(implicit F: MonadCancelThrow[F], L1: Local[F, Span[F]], L2: Logger[F]): Resource[F, A]

Given an entrypoint and a root span name, ensure that the acquisition and finalization phases of the passed Resource[F, A] are traced in separate root spans.

Given an entrypoint and a root span name, ensure that the acquisition and finalization phases of the passed Resource[F, A] are traced in separate root spans.

Value parameters

F

a MonadCancelThrow[F] instance for the given effect type

L1

an implicit Local[F, Span[F]] instance for the given effect type

L2

an implicit Logger[F] instance for the given effect type

entryPoint

an EntryPoint[F] capable of creating new root spans

name

the base of the span name to use for acquisition (the finalization span will append ".finalize" to this value to form its span name)

Attributes

Returns

the input Resource[F, A] with its acquisition and release phases wrapped in Natchez root spans

Source
TraceResourceLifecycleOps.scala

Deprecated methods

def traceResourceLifecycleInRootSpans(name: String, entryPoint: EntryPoint[F], F: MonadCancelThrow[F], L: Local[F, Span[F]]): Resource[F, A]

Attributes

Deprecated
true
Source
TraceResourceLifecycleOps.scala

Concrete fields

val resource: Resource[F, A]