Daniel
Daniel

Reputation: 744

Azure Application Insights agent log Java thread name

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

https://learn.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?

Upvotes: 0

Views: 584

Answers (1)

Tiny Wang
Tiny Wang

Reputation: 16066

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

Upvotes: 0

Related Questions