Interface Scope

  • All Superinterfaces:
    AutoCloseable

    public interface Scope
    extends AutoCloseable
    An AutoCloseable that represents a mounted context for a block of code. A failure to call close() will generally break tracing or cause memory leaks. It is recommended that you use this class with a try-with-resources block:
    
     try (Scope ignored = span.makeCurrent()) {
       ...
     }
     
    • Method Detail

      • noop

        static Scope noop()
        Returns a Scope that does nothing. Represents attaching a Context when it is already attached.