Class Observability.SpanScope

java.lang.Object
org.j7m.middleware.integrations.Observability.SpanScope
All Implemented Interfaces:
AutoCloseable
Enclosing class:
Observability

public final class Observability.SpanScope extends Object implements AutoCloseable
Thread-confined span lifetime. Closing is idempotent; errors never include exception text.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.j7m.middleware.distributed.TraceCarrier
    Returns this span's propagation metadata.
    void
    Restores context and performs a nonblocking bounded export offer.
    void
    Marks the span failed without retaining any throwable or sensitive message.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • failed

      public void failed()
      Marks the span failed without retaining any throwable or sensitive message.
    • carrier

      public org.j7m.middleware.distributed.TraceCarrier carrier()
      Returns this span's propagation metadata.
      Returns:
      bounded W3C child carrier
    • close

      public void close()
      Restores context and performs a nonblocking bounded export offer.
      Specified by:
      close in interface AutoCloseable
      Throws:
      IllegalStateException - when called from a different thread