简体   繁体   中英

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://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?

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.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM