Quarkus: Gelf handler chunking messages

Created on 10 May 2020  路  5Comments  路  Source: quarkusio/quarkus

Describe the bug
The gelf handler chunking the messages exceeding 8192 bytes, any meaning full java stack trace exceed this limits. Once messages are chunked Fluentd gelf input plugin rejects the chunked message because of unknown format and log statement never reach elasticsearch

Expected behavior
Allow users to configure the maximumMessageSize

quarkus.log.handler.gelf.maximumMessageSize=2000000

Actual behavior
Message chunking and loss of log statements

To Reproduce
Steps to reproduce the behavior:

  1. Configure Gelf logging in quarkus
  2. Create a log message size greater than 8192 bytes
  3. Notice the log statement chunking and underlying log aggregation rejecting the chunked messages (In this case EFK)

Configuration

# Add your application.properties here, if applicable.
quarkus.log.handler.gelf.enabled=true
quarkus.log.handler.gelf.host=${GELF_HOST:localhost}
quarkus.log.handler.gelf.port=${GELF_PORT:12201}

Screenshots
(If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

  • Output of uname -a or ver: amazon linux 2
  • Output of java -version: 11.0.6" 2020-01-14
  • GraalVM version (if different from Java): GraalVM CE 19.3.1
  • Quarkus version or git rev: 1.4.2-Final
  • Build tool (ie. output of mvnw --version or gradlew --version): mvn

Additional context
JBOSS logmanager JSON logging is outstanding, please support socket appender in addition to existing console, file. So that we can push the logs directly to fluentd tcp source.

kinbug

Most helpful comment

You need to use quarkus.log.handler.gelf.maximum-message-size

All 5 comments

@loicmathieu mind taking a look?

@missourian55 this is a trivial enhancement, and you give a strong explaination of why you need it so OK for me.
I'll work on a PR soon.

I just adopted 1.5.0.CR1 and still seeing this error while building the native image

14:22:50,444 WARN  [io.qua.config] Unrecognized configuration key "quarkus.log.handler.gelf.maximumMessageSize" was provided; it will be ignored

You need to use quarkus.log.handler.gelf.maximum-message-size

Just adopted 1.5.0.Final with this configuration and I am still seeing message chunking. I know for sure the stacktrace less than 2MB (defined maximum message size) .

JVM mode seems working, the problem is prevalent in the native image

chunking

quarkus.log.handler.gelf.enabled=true
quarkus.log.handler.gelf.timestamp-pattern=yyyy-MM-dd'T'HH:mm:ss.SSSZ
quarkus.log.handler.gelf.include-full-mdc=true
quarkus.log.handler.gelf.filter-stack-trace=true
quarkus.log.handler.gelf.extract-stack-trace=true
quarkus.log.handler.gelf.maximum-message-size=2000000
quarkus.log.handler.gelf.host=tcp:somehost
quarkus.log.handler.gelf.port=12201
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rashmini picture Rashmini  路  3Comments

MossabTN picture MossabTN  路  3Comments

gastaldi picture gastaldi  路  3Comments

halhelal picture halhelal  路  3Comments

nderwin picture nderwin  路  3Comments