0
votes

Is it possible to include the thread name when using the Java Agent for application insights?

https://docs.microsoft.com/en-us/azure/azure-monitor/app/java-standalone-config#auto-collected-logging

I am using logback and the instrumented log traces looks fine, but I miss the thread name. Can that be included someway?

1

1 Answers

0
votes

Per my searching, I also found no configuration on how to make java-application-insights to capture thread name with logback logs.

I found that the agent configuration only provides the property to decide the logging level(ERROR, WARN,INFO..., just like the linked doc you provided in the question said), while logback doesn't provide such a choice too that designed for application insights to make the thread name also be captured. So, to achieve your requirement, we can only include the thread name into log output manually. And here's my test result.

enter image description here