Packages

trait Tracing extends AnyRef

Self Type
Tracing
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Tracing
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def addEvent(name: String)(implicit trace: Trace): UIO[Span]

    Adds an event to the current span.

  2. abstract def addEventWithAttributes(name: String, attributes: Attributes)(implicit trace: Trace): UIO[Span]

    Adds an event with attributes to the current span.

    Adds an event with attributes to the current span.

    attributes

    event attributes

  3. abstract def extractSpan[C, R, E, A](propagator: TraceContextPropagator, carrier: IncomingContextCarrier[C], spanName: String, spanKind: SpanKind = SpanKind.INTERNAL, attributes: Attributes = Attributes.empty(), errorMapper: ErrorMapper[E] = ErrorMapper.default[E], links: Seq[SpanContext] = Seq.empty)(zio: ⇒ 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.

    C

    carrier

    propagator

    implementation of zio.telemetry.opentelemetry.tracing.propagation.TraceContextPropagator

    carrier

    mutable data from which the parent span is extracted

    spanName

    name of the child span

    spanKind

    kind of the child span

    errorMapper

    error mapper

    links

    spanContexts of the linked Spans.

    zio

    body of the child span

  4. abstract def extractSpanUnsafe[C](propagator: TraceContextPropagator, carrier: IncomingContextCarrier[C], spanName: String, spanKind: SpanKind = SpanKind.INTERNAL, attributes: Attributes = Attributes.empty(), links: Seq[SpanContext] = Seq.empty)(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.

    C

    carrier

    propagator

    implementation of zio.telemetry.opentelemetry.tracing.propagation.TraceContextPropagator

    carrier

    mutable data from which the parent span is extracted

    spanName

    name of the child span

    spanKind

    kind of the child span

  5. abstract def getCurrentContext(implicit trace: Trace): UIO[Context]

    Gets the current Context

  6. abstract def getCurrentSpan(implicit trace: Trace): UIO[Span]

    Gets the current Span.

  7. abstract def getCurrentSpanContext(implicit trace: Trace): UIO[SpanContext]

    Gets the current SpanContext.

  8. abstract def inSpan[R, E, A](span: Span, spanName: String, spanKind: SpanKind = SpanKind.INTERNAL, attributes: Attributes = Attributes.empty(), errorMapper: ErrorMapper[E] = ErrorMapper.default[E], links: Seq[SpanContext] = Seq.empty)(zio: ⇒ 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

    It also could be useful in combination with extractSpanUnsafe or spanUnsafe:

    for {
      (span, finalize) <- tracing.spanUnsafe("unsafe-span")
      // run some logic that would be wrapped in the span
      // modify the span
      _                <- zio @@ tracing.inSpan(span, "child-of-unsafe-span")
    } yield ()
    span

    externally provided span

    spanName

    name of the child span

    spanKind

    kind of the child span

    errorMapper

    error mapper

    links

    spanContexts of the linked Spans.

    zio

    body of the child span

  9. abstract def inject[C](propagator: TraceContextPropagator, carrier: OutgoingContextCarrier[C])(implicit trace: Trace): UIO[Unit]

    Injects the current span into carrier C.

    Injects the current span into carrier C.

    C

    carrier

    propagator

    implementation of zio.telemetry.opentelemetry.tracing.propagation.TraceContextPropagator

    carrier

    mutable data from which the parent span is extracted

  10. abstract def root[R, E, A](spanName: String, spanKind: SpanKind = SpanKind.INTERNAL, attributes: Attributes = Attributes.empty(), errorMapper: ErrorMapper[E] = ErrorMapper.default[E], links: Seq[SpanContext] = Seq.empty)(zio: ⇒ 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.

    spanName

    name of the new root span

    spanKind

    name of the new root span

    errorMapper

    error mapper

    links

    spanContexts of the linked Spans.

    zio

    body of the new root span

  11. 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.

    effect

    piece of code to execute in the current context

  12. 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.

    make

    function for providing a scala.concurrent.Future by a given scala.concurrent.ExecutionContext to execute in the current context

  13. 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.

    effect

    piece of code to execute in the current context

  14. 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.

    Sets an attribute of the current span.

    i1

    dummy implicit value to disambiguate the method calls

    i2

    dummy implicit value to disambiguate the method calls

    i3

    dummy implicit value to disambiguate the method calls

  15. abstract def setAttribute(name: String, values: Seq[Long])(implicit i1: DummyImplicit, i2: DummyImplicit, trace: Trace): UIO[Span]

    Sets an attribute of the current span.

    Sets an attribute of the current span.

    i1

    dummy implicit value to disambiguate the method calls

    i2

    dummy implicit value to disambiguate the method calls

  16. abstract def setAttribute(name: String, values: Seq[Boolean])(implicit i1: DummyImplicit, trace: Trace): UIO[Span]

    Sets an attribute of the current span.

    Sets an attribute of the current span.

    i1

    dummy implicit value to disambiguate the method calls

  17. abstract def setAttribute(name: String, values: Seq[String])(implicit trace: Trace): UIO[Span]

    Sets an attribute of the current span.

  18. abstract def setAttribute[T](key: AttributeKey[T], value: T)(implicit trace: Trace): UIO[Span]

    Sets an attribute of the current span.

  19. abstract def setAttribute(name: String, value: String)(implicit trace: Trace): UIO[Span]

    Sets an attribute of the current span.

  20. abstract def setAttribute(name: String, value: Long)(implicit trace: Trace): UIO[Span]

    Sets an attribute of the current span.

  21. abstract def setAttribute(name: String, value: Double)(implicit trace: Trace): UIO[Span]

    Sets an attribute of the current span.

  22. abstract def setAttribute(name: String, value: Boolean)(implicit trace: Trace): UIO[Span]

    Sets an attribute of the current span.

  23. abstract def span[R, E, A](spanName: String, spanKind: SpanKind = SpanKind.INTERNAL, attributes: Attributes = Attributes.empty(), errorMapper: ErrorMapper[E] = ErrorMapper.default[E], links: Seq[SpanContext] = Seq.empty)(zio: ⇒ 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.

    spanName

    name of the child span

    spanKind

    kind of the child span

    errorMapper

    error mapper

    links

    spanContexts of the linked Spans.

    zio

    body of the child span

  24. abstract def spanScoped(spanName: String, spanKind: SpanKind = SpanKind.INTERNAL, attributes: Attributes = Attributes.empty(), errorMapper: ErrorMapper[Any] = ErrorMapper.default[Any], links: Seq[SpanContext] = Seq.empty)(implicit trace: Trace): ZIO[Scope, Nothing, Unit]

    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 scope closes.

    spanName

    name of the child span

    spanKind

    kind of the child span

    errorMapper

    error mapper

    links

    spanContexts of the linked Spans.

  25. abstract def spanUnsafe(spanName: String, spanKind: SpanKind = SpanKind.INTERNAL, attributes: Attributes = Attributes.empty(), links: Seq[SpanContext] = Seq.empty)(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.

    Primarily useful for interop.

    spanName

    name of the child span

    spanKind

    kind of the child span

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  20. object aspects

Inherited from AnyRef

Inherited from Any

Ungrouped