Class KafkaStructuredLoggingService<I extends com.linecorp.armeria.common.Request,​O extends com.linecorp.armeria.common.Response,​L>

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected void close()
      Deprecated.
       
      static <I extends com.linecorp.armeria.common.Request,​O extends com.linecorp.armeria.common.Response,​L>
      Function<com.linecorp.armeria.server.Service<I,​O>,​com.linecorp.armeria.server.logging.structured.StructuredLoggingService<I,​O,​L>>
      newDecorator​(String bootstrapServers, String topic, com.linecorp.armeria.server.logging.structured.StructuredLogBuilder<L> logBuilder)
      Deprecated.
      Creates a decorator which provides StructuredLoggingService with default Producer and defaulting key to null.
      static <I extends com.linecorp.armeria.common.Request,​O extends com.linecorp.armeria.common.Response,​L>
      Function<com.linecorp.armeria.server.Service<I,​O>,​com.linecorp.armeria.server.logging.structured.StructuredLoggingService<I,​O,​L>>
      newDecorator​(String bootstrapServers, String topic, com.linecorp.armeria.server.logging.structured.StructuredLogBuilder<L> logBuilder, KafkaStructuredLoggingService.KeySelector<L> keySelector)
      Deprecated.
      Creates a decorator which provides StructuredLoggingService with default Producer.
      static <I extends com.linecorp.armeria.common.Request,​O extends com.linecorp.armeria.common.Response,​L>
      Function<com.linecorp.armeria.server.Service<I,​O>,​com.linecorp.armeria.server.logging.structured.StructuredLoggingService<I,​O,​L>>
      newDecorator​(Producer<byte[],​L> producer, String topic, com.linecorp.armeria.server.logging.structured.StructuredLogBuilder<L> logBuilder)
      Deprecated.
      Creates a decorator which provides StructuredLoggingService with defaulting key to null.
      static <I extends com.linecorp.armeria.common.Request,​O extends com.linecorp.armeria.common.Response,​L>
      Function<com.linecorp.armeria.server.Service<I,​O>,​com.linecorp.armeria.server.logging.structured.StructuredLoggingService<I,​O,​L>>
      newDecorator​(Producer<byte[],​L> producer, String topic, com.linecorp.armeria.server.logging.structured.StructuredLogBuilder<L> logBuilder, KafkaStructuredLoggingService.KeySelector<L> keySelector)
      Deprecated.
      Creates a decorator which provides StructuredLoggingService with full set of arguments.
      protected void writeLog​(com.linecorp.armeria.common.logging.RequestLog log, L structuredLog)
      Deprecated.
       
      • Methods inherited from class com.linecorp.armeria.server.logging.structured.StructuredLoggingService

        serve, serviceAdded
      • Methods inherited from class com.linecorp.armeria.server.DecoratingService

        shouldCachePath
      • Methods inherited from class com.linecorp.armeria.common.util.AbstractUnwrappable

        as, delegate, toString
      • Methods inherited from interface com.linecorp.armeria.server.Service

        as, decorate, decorate, decorate
    • Method Detail

      • newDecorator

        public static <I extends com.linecorp.armeria.common.Request,​O extends com.linecorp.armeria.common.Response,​L> Function<com.linecorp.armeria.server.Service<I,​O>,​com.linecorp.armeria.server.logging.structured.StructuredLoggingService<I,​O,​L>> newDecorator​(Producer<byte[],​L> producer,
                                                                                                                                                                                                                                                                                                          String topic,
                                                                                                                                                                                                                                                                                                          com.linecorp.armeria.server.logging.structured.StructuredLogBuilder<L> logBuilder,
                                                                                                                                                                                                                                                                                                          @Nullable
                                                                                                                                                                                                                                                                                                          KafkaStructuredLoggingService.KeySelector<L> keySelector)
        Deprecated.
        Creates a decorator which provides StructuredLoggingService with full set of arguments.
        Type Parameters:
        I - the Request type
        O - the Response type
        L - the type of the structured log representation
        Parameters:
        producer - a kafka Producer producer which is used to send logs to Kafka
        topic - a name of topic which is used to send logs
        logBuilder - an instance of StructuredLogBuilder which is used to construct a log entry
        keySelector - a KafkaStructuredLoggingService.KeySelector which is used to decide what key to use for the log
        Returns:
        a service decorator which adds structured logging support integrated to Kafka
      • newDecorator

        public static <I extends com.linecorp.armeria.common.Request,​O extends com.linecorp.armeria.common.Response,​L> Function<com.linecorp.armeria.server.Service<I,​O>,​com.linecorp.armeria.server.logging.structured.StructuredLoggingService<I,​O,​L>> newDecorator​(Producer<byte[],​L> producer,
                                                                                                                                                                                                                                                                                                          String topic,
                                                                                                                                                                                                                                                                                                          com.linecorp.armeria.server.logging.structured.StructuredLogBuilder<L> logBuilder)
        Deprecated.
        Creates a decorator which provides StructuredLoggingService with defaulting key to null.
        Type Parameters:
        I - the Request type
        O - the Response type
        L - the type of the structured log representation
        Parameters:
        producer - a kafka Producer producer which is used to send logs to Kafka
        topic - a name of topic which is used to send logs
        logBuilder - an instance of StructuredLogBuilder which is used to construct a log entry
        Returns:
        a service decorator which adds structured logging support integrated to Kafka
      • newDecorator

        public static <I extends com.linecorp.armeria.common.Request,​O extends com.linecorp.armeria.common.Response,​L> Function<com.linecorp.armeria.server.Service<I,​O>,​com.linecorp.armeria.server.logging.structured.StructuredLoggingService<I,​O,​L>> newDecorator​(String bootstrapServers,
                                                                                                                                                                                                                                                                                                          String topic,
                                                                                                                                                                                                                                                                                                          com.linecorp.armeria.server.logging.structured.StructuredLogBuilder<L> logBuilder,
                                                                                                                                                                                                                                                                                                          @Nullable
                                                                                                                                                                                                                                                                                                          KafkaStructuredLoggingService.KeySelector<L> keySelector)
        Deprecated.
        Creates a decorator which provides StructuredLoggingService with default Producer.
        Type Parameters:
        I - the Request type
        O - the Response type
        L - the type of the structured log representation
        Parameters:
        bootstrapServers - a bootstrap.servers config to specify destination Kafka cluster
        topic - a name of topic which is used to send logs
        logBuilder - an instance of StructuredLogBuilder which is used to construct a log entry
        keySelector - a KafkaStructuredLoggingService.KeySelector which is used to decide what key to use for the log
        Returns:
        a service decorator which adds structured logging support integrated to Kafka
      • newDecorator

        public static <I extends com.linecorp.armeria.common.Request,​O extends com.linecorp.armeria.common.Response,​L> Function<com.linecorp.armeria.server.Service<I,​O>,​com.linecorp.armeria.server.logging.structured.StructuredLoggingService<I,​O,​L>> newDecorator​(String bootstrapServers,
                                                                                                                                                                                                                                                                                                          String topic,
                                                                                                                                                                                                                                                                                                          com.linecorp.armeria.server.logging.structured.StructuredLogBuilder<L> logBuilder)
        Deprecated.
        Creates a decorator which provides StructuredLoggingService with default Producer and defaulting key to null.
        Type Parameters:
        I - the Request type
        O - the Response type
        L - the type of the structured log representation
        Parameters:
        bootstrapServers - a bootstrap.servers config to specify destination Kafka cluster
        topic - a name of topic which is used to send logs
        logBuilder - an instance of StructuredLogBuilder which is used to construct a log entry
        Returns:
        a service decorator which adds structured logging support integrated to Kafka
      • writeLog

        protected void writeLog​(com.linecorp.armeria.common.logging.RequestLog log,
                                L structuredLog)
        Deprecated.
        Specified by:
        writeLog in class com.linecorp.armeria.server.logging.structured.StructuredLoggingService<I extends com.linecorp.armeria.common.Request,​O extends com.linecorp.armeria.common.Response,​L>
      • close

        protected void close()
        Deprecated.
        Overrides:
        close in class com.linecorp.armeria.server.logging.structured.StructuredLoggingService<I extends com.linecorp.armeria.common.Request,​O extends com.linecorp.armeria.common.Response,​L>