Class TraceContext.Scope

java.lang.Object
tech.riemann.nif.trace.TraceContext.Scope
All Implemented Interfaces:
AutoCloseable
Enclosing class:
TraceContext

public static class TraceContext.Scope extends Object implements AutoCloseable
Trace作用域,用于自动清理ThreadLocal 实现AutoCloseable接口,支持try-with-resources语法
Author:
Riemann

创建日期: 2026/03/27 10:14:44

  • Method Details

    • close

      public void close()
      关闭作用域,恢复之前的traceId或清理
      Specified by:
      close in interface AutoCloseable