Exception Detector 🔗︎

Overview 🔗︎

This filter plugin consumes a log stream of JSON objects which contain single-line log messages. If a consecutive sequence of log messages form an exception stack trace, they forwarded as a single, combined JSON object. Otherwise, the input log data is forwarded as is. More info at https://github.com/GoogleCloudPlatform/fluent-plugin-detect-exceptions

Note: As Tag management is not supported yet, this Plugin is mutually exclusive with Tag normaliser

Example output configurations 🔗︎

 - detectExceptions:
     languages: java, python
     multiline_flush_interval: 0.1

Configuration 🔗︎

DetectExceptions 🔗︎

message (string, optional) 🔗︎

The field which contains the raw message text in the input JSON data.

Default: "”

remove_tag_prefix (string, optional) 🔗︎

The prefix to be removed from the input tag when outputting a record.

Default: "”

multiline_flush_interval (string, optional) 🔗︎

The interval of flushing the buffer for multiline format.

Default: nil

languages ([]string, optional) 🔗︎

Programming languages for which to detect exceptions.

Default: []

max_lines (int, optional) 🔗︎

Maximum number of lines to flush (0 means no limit)

Default: 1000

max_bytes (int, optional) 🔗︎

Maximum number of bytes to flush (0 means no limit)

Default: 0

stream (string, optional) 🔗︎

Separate log streams by this field in the input JSON data.

Default: "”

force_line_breaks (bool, optional) 🔗︎

Force line breaks between each lines when comibining exception stacks.

Default: false

Example Exception Detector filter configurations 🔗︎

apiVersion: logging.banzaicloud.io/v1beta1
kind: Flow
 name: demo-flow
   - detectExceptions:
       multiline_flush_interval: 0.1
         - java
         - python
 selectors: {}
   - demo-output

Fluentd Config Result 🔗︎

<match kubernetes.**>
 @type detect_exceptions
 @id test_detect_exceptions
 languages ["java","python"]
 multiline_flush_interval 0.1
 remove_tag_prefix kubernetes