Class ComposableInterceptor<T>

java.lang.Object
io.opentelemetry.contrib.interceptor.common.ComposableInterceptor<T>
All Implemented Interfaces:
Interceptor<T>

public final class ComposableInterceptor<T> extends Object implements Interceptor<T>
Allows to run an item through a list of interceptors in the order they were added.
  • Constructor Details

    • ComposableInterceptor

      public ComposableInterceptor()
  • Method Details

    • add

      public void add(Interceptor<T> interceptor)
    • intercept

      @Nullable public T intercept(T item)
      Description copied from interface: Interceptor
      Intercepts a signal.
      Specified by:
      intercept in interface Interceptor<T>
      Parameters:
      item - The signal object.
      Returns:
      The received signal modified (or null for excluding this signal from getting exported). If there's no operation needed to be done for a specific signal, it should be returned as is.