Class LogExporter

java.lang.Object
io.confluent.telemetry.events.exporter.log.LogExporter
All Implemented Interfaces:
Exporter<io.confluent.telemetry.api.events.Event>, AutoCloseable, org.apache.kafka.common.Configurable, org.apache.kafka.common.Reconfigurable

public class LogExporter extends Object implements Exporter<io.confluent.telemetry.api.events.Event>
The LogExporter sends events to the SLF4J-configured log file
  • Constructor Details

    • LogExporter

      public LogExporter()
  • Method Details

    • configure

      public void configure(Map<String,?> configs)
      Specified by:
      configure in interface org.apache.kafka.common.Configurable
    • emit

      public CompletableFuture<Boolean> emit(io.confluent.telemetry.api.events.Event event)
      Description copied from interface: Exporter
      Filter and transform the events as appropriate and send to the specified destination. This method takes care of batching, serialization and retries.
      Specified by:
      emit in interface Exporter<io.confluent.telemetry.api.events.Event>
      Returns:
      A CompletableFuture object with a Boolean value, indicates if event has been sent successfully
    • routeReady

      public boolean routeReady(io.confluent.telemetry.api.events.Event event)
      Description copied from interface: Exporter
      Checks if a topic is ready. This is specifically used for transports where the routes require some time to be ready. For eg. Kafka topics. For high volume audit event streams, the events are only sent to Kafka exporter if the topic is ready.
      Specified by:
      routeReady in interface Exporter<io.confluent.telemetry.api.events.Event>
      Returns:
      if the route for this event is ready.
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • reconfigurableConfigs

      public Set<String> reconfigurableConfigs()
      Specified by:
      reconfigurableConfigs in interface org.apache.kafka.common.Reconfigurable
    • validateReconfiguration

      public void validateReconfiguration(Map<String,?> configs) throws org.apache.kafka.common.config.ConfigException
      Specified by:
      validateReconfiguration in interface org.apache.kafka.common.Reconfigurable
      Throws:
      org.apache.kafka.common.config.ConfigException
    • reconfigure

      public void reconfigure(Map<String,?> configs)
      Specified by:
      reconfigure in interface org.apache.kafka.common.Reconfigurable