类 TracerRegistry

java.lang.Object
io.agentscope.core.tracing.TracerRegistry

@Deprecated(forRemoval=true, since="2.0.0") public class TracerRegistry extends Object
已过时, 待删除: 此 API 元素将从以后的版本中删除。
since 2.0.0. Use OtelTracingMiddleware instead.
Registry for the global Tracer instance.

Reactor global hook: This class provides methods to enable or disable a global Reactor hook (via enableTracingHook() and disableTracingHook()) that propagates tracing context across Reactor operators. Enabling this hook affects all Reactor operations in the JVM, which may have performance implications even for code unrelated to tracing. Use with care, and only enable the hook if you require tracing context propagation for all Reactor pipelines.

  • 构造器概要

    构造器
    构造器
    说明
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static void
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
    Disables the global Reactor hook for tracing context propagation.
    static void
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
    Enables the global Reactor hook for tracing context propagation.
    static Tracer
    get()
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
     
    static void
    register(Tracer tracer)
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
     
    static void
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
     

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • TracerRegistry

      public TracerRegistry()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
  • 方法详细资料

    • enableTracingHook

      public static void enableTracingHook()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      Enables the global Reactor hook for tracing context propagation.

      Mechanism: This registers a global hook using Hooks.onEachOperator(String, Function) that intercepts every Reactor operator creation involved in Flux and Mono chains. It wraps the Subscriber to ensure that downstream signals (onNext, onError, onComplete) are processed within the tracing context captured at assembly time or from upstream.

      Activation: The hook is active immediately after calling this method. It affects all subsequently assembled Reactor streams in the JVM.

      Performance: Enabling this hook introduces overhead for every Reactor operator in the application, even those not strictly related to AgentScope tracing. It involves object allocation (wrapper subscribers) and context context capturing/restoring. It should be enabled only when automatic context propagation across asynchronous boundaries is required.

      This method is safe to call multiple times; the hook will only be registered once.

    • disableTracingHook

      public static void disableTracingHook()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      Disables the global Reactor hook for tracing context propagation. This removes the hook for all Reactor operators in the JVM.
    • register

      public static void register(Tracer tracer)
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
    • resetToNoop

      public static void resetToNoop()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
    • get

      public static Tracer get()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。