dd-trace-java
dd-trace-java copied to clipboard
dd.trace logs appearing in Datadog as errors
I'm experiencing issues with where in my Datadog logs for a java service, I'm seeing dd.trace entries which are not being parsed and additionally are being categorized as errors. I've followed the in app setup for k8s and Java, and the Java logs are parsed just fine. It's the mixed in dd.trace logs that are causing issues, like this one.
[dd.trace 2022-06-29 08:28:03:684 +0000] [main] WARN com.datadog.appsec.powerwaf.PowerWAFModule - WAF has rule against unknown address grpc.server.request.metadata
I found this old issue where the last entry mentions setting up a custom parse rule, which seems to resolve the issue https://github.com/DataDog/dd-trace-java/issues/693#issuecomment-663042856
However this issue is quite old and I'm puzzled that this case isn't handled by default?
Hi @dan-lind if you don't want tracer logging in your application logs then you can route it to a separate file with
-Ddatadog.slf4j.simpleLogger.logFile=path/to/tracer.log
(note: other SimpleLogger settings can be used with the tracer - just with datadog.slf4j.simpleLogger. as the prefix)
I was more surprised by the fact that even though I followed all the docs, this case is not handled by default, and I even end up with error logs (which are not errors) by default. I think this should at least be mentioned somewhere in the docs. It took me quite some time to find that issue from 2019...
Yes I agree, I'll pass on your feedback
FYI for people looking at this issue, this thread/comment is really useful. https://github.com/DataDog/dd-trace-java/issues/1109#issuecomment-1590056133
Closing in favor of https://github.com/DataDog/dd-trace-java/issues/1109