trace

zio.blocks.telemetry.trace
object trace

Global tracing entry point. Works without setup — stores spans in memory by default. Call install to wire production exporters.

App code uses this directly. Library code should accept Tracer via DI.

Attributes

Source
trace.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trace.type

Members list

Value members

Concrete methods

def clearSpans(): Unit

Clears all collected spans from the in-memory processor.

Clears all collected spans from the in-memory processor.

Attributes

Source
trace.scala

Returns spans collected by the default in-memory processor.

Returns spans collected by the default in-memory processor.

Attributes

Source
trace.scala
def get(name: String): Tracer

Returns a named Tracer for a specific instrumentation scope.

Returns a named Tracer for a specific instrumentation scope.

Attributes

Source
trace.scala
def install(provider: TracerProvider): Unit

Replaces the default TracerProvider with a user-configured one.

Replaces the default TracerProvider with a user-configured one.

Attributes

Source
trace.scala
def removeAll(): Unit

Remove the installed TracerProvider. After this, spans are no-ops until you install a provider.

Remove the installed TracerProvider. After this, spans are no-ops until you install a provider.

Attributes

Source
trace.scala
def span[A](name: String)(f: Span => A): A

Creates a span using the default tracer.

Creates a span using the default tracer.

Attributes

Source
trace.scala
def span[A](name: String, kind: SpanKind)(f: Span => A): A

Creates a span with explicit kind.

Creates a span with explicit kind.

Attributes

Source
trace.scala
def span[A](name: String, kind: SpanKind, attributes: Attributes)(f: Span => A): A

Creates a span with explicit kind and attributes.

Creates a span with explicit kind and attributes.

Attributes

Source
trace.scala