Class TracingChannelOutboundHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelOutboundHandlerAdapter
org.springframework.cloud.sleuth.brave.instrument.reactor.netty.TracingChannelOutboundHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelOutboundHandler

public class TracingChannelOutboundHandler extends io.netty.channel.ChannelOutboundHandlerAdapter
ChannelOutboundHandlerAdapter that wraps all events in scope.

WARNING: Using this feature can lead to serious performance issues. This should be only used for debugging purposes.

Since:
3.1.9
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Constructor Summary

    Constructors
    Constructor
    Description
    TracingChannelOutboundHandler(brave.propagation.CurrentTraceContext currentTraceContext)
    Creates a new instance of TracingChannelOutboundHandler.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bind(io.netty.channel.ChannelHandlerContext ctx, SocketAddress localAddress, io.netty.channel.ChannelPromise promise)
     
    void
    close(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise)
     
    void
    connect(io.netty.channel.ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, io.netty.channel.ChannelPromise promise)
     
    void
    deregister(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise)
     
    void
    disconnect(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise)
     
    void
    flush(io.netty.channel.ChannelHandlerContext ctx)
     
    void
    handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
     
    void
    handlerRemoved(io.netty.channel.ChannelHandlerContext ctx)
     
    boolean
     
    void
    read(io.netty.channel.ChannelHandlerContext ctx)
     
    void
    write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise)
     

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, exceptionCaught

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler

    exceptionCaught
  • Constructor Details

    • TracingChannelOutboundHandler

      public TracingChannelOutboundHandler(brave.propagation.CurrentTraceContext currentTraceContext)
      Creates a new instance of TracingChannelOutboundHandler.
      Parameters:
      currentTraceContext - current trace context
  • Method Details

    • bind

      public void bind(io.netty.channel.ChannelHandlerContext ctx, SocketAddress localAddress, io.netty.channel.ChannelPromise promise)
      Specified by:
      bind in interface io.netty.channel.ChannelOutboundHandler
      Overrides:
      bind in class io.netty.channel.ChannelOutboundHandlerAdapter
    • connect

      public void connect(io.netty.channel.ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, io.netty.channel.ChannelPromise promise)
      Specified by:
      connect in interface io.netty.channel.ChannelOutboundHandler
      Overrides:
      connect in class io.netty.channel.ChannelOutboundHandlerAdapter
    • disconnect

      public void disconnect(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise)
      Specified by:
      disconnect in interface io.netty.channel.ChannelOutboundHandler
      Overrides:
      disconnect in class io.netty.channel.ChannelOutboundHandlerAdapter
    • close

      public void close(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise)
      Specified by:
      close in interface io.netty.channel.ChannelOutboundHandler
      Overrides:
      close in class io.netty.channel.ChannelOutboundHandlerAdapter
    • deregister

      public void deregister(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise)
      Specified by:
      deregister in interface io.netty.channel.ChannelOutboundHandler
      Overrides:
      deregister in class io.netty.channel.ChannelOutboundHandlerAdapter
    • read

      public void read(io.netty.channel.ChannelHandlerContext ctx)
      Specified by:
      read in interface io.netty.channel.ChannelOutboundHandler
      Overrides:
      read in class io.netty.channel.ChannelOutboundHandlerAdapter
    • write

      public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise)
      Specified by:
      write in interface io.netty.channel.ChannelOutboundHandler
      Overrides:
      write in class io.netty.channel.ChannelOutboundHandlerAdapter
    • flush

      public void flush(io.netty.channel.ChannelHandlerContext ctx)
      Specified by:
      flush in interface io.netty.channel.ChannelOutboundHandler
      Overrides:
      flush in class io.netty.channel.ChannelOutboundHandlerAdapter
    • isSharable

      public boolean isSharable()
      Overrides:
      isSharable in class io.netty.channel.ChannelHandlerAdapter
    • handlerAdded

      public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      handlerAdded in interface io.netty.channel.ChannelHandler
      Overrides:
      handlerAdded in class io.netty.channel.ChannelHandlerAdapter
      Throws:
      Exception
    • handlerRemoved

      public void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      handlerRemoved in interface io.netty.channel.ChannelHandler
      Overrides:
      handlerRemoved in class io.netty.channel.ChannelHandlerAdapter
      Throws:
      Exception