Class UdpReporter.Builder

java.lang.Object
io.servicetalk.opentracing.zipkin.publisher.reporter.UdpReporter.Builder
Enclosing class:
UdpReporter

public static final class UdpReporter.Builder extends Object
A builder to create a new UdpReporter.
  • Constructor Details

    • Builder

      public Builder(SocketAddress collectorAddress)
      Create a new UdpReporter.Builder for a given collectorAddress.
      Parameters:
      collectorAddress - the collector SocketAddress
  • Method Details

    • codec

      public UdpReporter.Builder codec(Codec codec)
      Sets the Codec to encode the Spans with.
      Parameters:
      codec - the codec to use for this span.
      Returns:
      this
    • ioExecutor

      public UdpReporter.Builder ioExecutor(IoExecutor ioExecutor)
      Sets an IoExecutor to use for writing to the datagram channel.
      Parameters:
      ioExecutor - IoExecutor to use to write with.
      Returns:
      this
    • executor

      public UdpReporter.Builder executor(Executor executor)
      Sets an Executor to use when required.
      Parameters:
      executor - Executor to use
      Returns:
      this
    • enableWireLogging

      public UdpReporter.Builder enableWireLogging(String loggerName, LogLevel logLevel, BooleanSupplier logUserData)
      Enables wire-logging for UDP packets sent.
      Parameters:
      loggerName - The name of the logger to log wire events.
      logLevel - The level to log at.
      logUserData - true to include user data. false to exclude user data and log only network events. This method is invoked for each data object allowing for dynamic behavior.
      Returns:
      this
    • build

      public UdpReporter build()
      Builds a new UdpReporter instance with this builder's options.

      This method may block while the underlying UDP channel is being bound.

      Returns:
      a new UdpReporter