Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java multi-line logs merge into one line #120

Open
xianhuadezhuren opened this issue May 17, 2023 · 1 comment
Open

Java multi-line logs merge into one line #120

xianhuadezhuren opened this issue May 17, 2023 · 1 comment

Comments

@xianhuadezhuren
Copy link

Problem

Hello, when I collect java error logs, multiple lines are merged into one line. No matter how I configure it, kibana displays two lines.
...

[oksa-center:10.200.1.60:8061] 2023-05-17 17:07:57.799 ERROR 1 [cb891261eb664bca] [http-nio-8061-exec-9] com.neo.oksa.global.GlobalExceptionHandler ERRORMESSAGE 服务器未知异常,请求地址:/customer/validateStaff

java.lang.RuntimeException: Required String parameter 'staffCode' is not present
at com.neo.feign.handler.FeignExceptionDecoder.parseException(FeignExceptionDecoder.java:61)
at com.neo.feign.handler.FeignExceptionDecoder.decode(FeignExceptionDecoder.java:36)
at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
at com.sun.proxy.$Proxy217.getByStaffCode(Unknown Source)
at com.neo.oksa.service.impl.CustomerServiceImpl.validateStaff(CustomerServiceImpl.java:461)
at com.neo.oksa.controller.CustomerController.validateStaff$original$b7UqmD2f(CustomerController.java:154)
at com.neo.oksa.controller.CustomerController.validateStaff$original$b7UqmD2f$accessor$bK9pJlec(CustomerController.java)
at com.neo.oksa.controller.CustomerController$auxiliary$JNrrwJhu.call(Unknown Source)
at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:86)
at com.neo.oksa.controller.CustomerController.validateStaff(CustomerController.java)
at com.neo.oksa.controller.CustomerController$$FastClassBySpringCGLIB$$a8c94dc1.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)

Steps to replicate

...
<filter **>
@type concat
key message
format_firstline /^[/
continuous_line_regexp /Caused\sby:|\s+at\s.*|^java|\s+ ... (\d)+ more/
multiline_end_regexp /^at/
separator ""
flush_interval 5s

...

Expected Behavior

i want to collect the above logs into one line of output
...

Your environment

  • OS version
  • paste result of fluentd --version or td-agent --version
  • plugin version
    • paste boot log of fluentd or td-agent
    • paste result of fluent-gem list, td-agent-gem list or your Gemfile.lock
@valentinacala
Copy link

hi @xianhuadezhuren :) Did u find any solution in the meantime?
I see that this feature works on the current version of the plugin only if a well defined number of lines is specified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants