trait Tracing extends AnyRef
- Self Type
- Tracing
- Alphabetic
- By Inheritance
- Tracing
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
addEvent(name: String)(implicit trace: Trace): UIO[Span]
Adds an event to the current span
-
abstract
def
addEventWithAttributes(name: String, attributes: Attributes)(implicit trace: Trace): UIO[Span]
Adds an event with attributes to the current span.
-
abstract
def
getCurrentBaggage(implicit trace: Trace): UIO[Baggage]
Gets the baggage from current context
-
abstract
def
getCurrentContext(implicit trace: Trace): UIO[Context]
Gets current Context
-
abstract
def
getCurrentSpan(implicit trace: Trace): UIO[Span]
Gets current Span
-
abstract
def
getCurrentSpanContext(implicit trace: Trace): UIO[SpanContext]
Gets the current SpanContext
-
abstract
def
inSpan[R, E, A](span: Span, spanName: String, spanKind: SpanKind = SpanKind.INTERNAL, toErrorStatus: ErrorMapper[E] = ErrorMapper.default[E])(effect: ⇒ ZIO[R, E, A])(implicit trace: Trace): ZIO[R, E, A]
Mark this effect as the child of an externally provided span.
Mark this effect as the child of an externally provided span. Ends the span when the effect finishes. zio-opentelemetry will mark the span as being the child of the external one.
This is designed for use-cases where you are incrementally introducing zio & zio-telemetry in a project that already makes use of instrumentation, and you need to interoperate with futures-based code.
The caller is solely responsible for managing the external span, including calling Span.end
-
abstract
def
inject[C](propagator: TextMapPropagator, carrier: C, setter: TextMapSetter[C])(implicit trace: Trace): UIO[Unit]
Injects the current span into carrier
C
-
abstract
def
root[R, E, A](spanName: String, spanKind: SpanKind = SpanKind.INTERNAL, toErrorStatus: ErrorMapper[E] = ErrorMapper.default[E])(effect: ⇒ ZIO[R, E, A])(implicit trace: Trace): ZIO[R, E, A]
Sets the current span to be the new root span with name 'spanName'.
Sets the current span to be the new root span with name 'spanName'. Ends the span when the effect finishes.
-
abstract
def
scopedEffect[A](effect: ⇒ A)(implicit trace: Trace): Task[A]
Introduces a thread-local scope during the execution allowing for non-zio context propagation.
Introduces a thread-local scope during the execution allowing for non-zio context propagation.
Closes the scope when the effect finishes.
-
abstract
def
scopedEffectFromFuture[A](make: (ExecutionContext) ⇒ Future[A])(implicit trace: Trace): Task[A]
Introduces a thread-local scope from the currently active zio span allowing for non-zio context propagation.
Introduces a thread-local scope from the currently active zio span allowing for non-zio context propagation. This scope will only be active during Future creation, so another mechanism must be used to ensure that the scope is passed into the Future callbacks.
The java auto instrumentation package provides such a mechanism out of the box, so one is not provided as a part of this method.
CLoses the scope when the effect finishes
-
abstract
def
scopedEffectTotal[A](effect: ⇒ A)(implicit trace: Trace): UIO[A]
Introduces a thread-local scope during the execution allowing for non-zio context propagation.
Introduces a thread-local scope during the execution allowing for non-zio context propagation.
Closes the scope when the effect finishes.
-
abstract
def
setAttribute(name: String, values: Seq[Double])(implicit i1: DummyImplicit, i2: DummyImplicit, i3: DummyImplicit, trace: Trace): UIO[Span]
Sets an attribute of the current span.
-
abstract
def
setAttribute(name: String, values: Seq[Long])(implicit i1: DummyImplicit, i2: DummyImplicit, trace: Trace): UIO[Span]
Sets an attribute of the current span.
-
abstract
def
setAttribute(name: String, values: Seq[Boolean])(implicit i1: DummyImplicit, trace: Trace): UIO[Span]
Sets an attribute of the current span.
-
abstract
def
setAttribute(name: String, values: Seq[String])(implicit trace: Trace): UIO[Span]
Sets an attribute of the current span.
-
abstract
def
setAttribute[T](key: AttributeKey[T], value: T)(implicit trace: Trace): UIO[Span]
Sets an attribute of the current span.
-
abstract
def
setAttribute(name: String, value: String)(implicit trace: Trace): UIO[Span]
Sets an attribute of the current span.
-
abstract
def
setAttribute(name: String, value: Long)(implicit trace: Trace): UIO[Span]
Sets an attribute of the current span.
-
abstract
def
setAttribute(name: String, value: Double)(implicit trace: Trace): UIO[Span]
Sets an attribute of the current span.
-
abstract
def
setAttribute(name: String, value: Boolean)(implicit trace: Trace): UIO[Span]
Sets an attribute of the current span.
-
abstract
def
setBaggage(name: String, value: String)(implicit trace: Trace): UIO[Context]
Sets a baggage entry in the current context
-
abstract
def
span[R, E, A](spanName: String, spanKind: SpanKind = SpanKind.INTERNAL, toErrorStatus: ErrorMapper[E] = ErrorMapper.default[E])(effect: ⇒ ZIO[R, E, A])(implicit trace: Trace): ZIO[R, E, A]
Sets the current span to be the child of the current span with name 'spanName'.
Sets the current span to be the child of the current span with name 'spanName'. Ends the span when the effect finishes.
-
abstract
def
spanFrom[C, R, E, A](propagator: TextMapPropagator, carrier: C, getter: TextMapGetter[C], spanName: String, spanKind: SpanKind = SpanKind.INTERNAL, toErrorStatus: ErrorMapper[E] = ErrorMapper.default[E])(effect: ⇒ ZIO[R, E, A])(implicit trace: Trace): ZIO[R, E, A]
Extracts the span from carrier
C
and set its child span with name 'spanName' as the current span.Extracts the span from carrier
C
and set its child span with name 'spanName' as the current span. Ends the span when the effect finishes. -
abstract
def
spanFromUnsafe[C](propagator: TextMapPropagator, carrier: C, getter: TextMapGetter[C], spanName: String, spanKind: SpanKind = SpanKind.INTERNAL)(implicit trace: Trace): UIO[(Span, UIO[Any])]
Extracts the span from carrier
C
and unsafely set its child span with name 'spanName' as the current span.Extracts the span from carrier
C
and unsafely set its child span with name 'spanName' as the current span. You need to make sure to call the finalize effect to end the span. Primarily useful for interop. -
abstract
def
spanUnsafe(spanName: String, spanKind: SpanKind = SpanKind.INTERNAL)(implicit trace: Trace): UIO[(Span, UIO[Any])]
Unsafely sets the current span to be the child of the current span with name 'spanName'.
Unsafely sets the current span to be the child of the current span with name 'spanName'. You need to manually call the finalizer to end the span. Useful for interop.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- object aspects