[英]new relic - instrumenting an app with multiple threaded objects
I have a reasonably simple Java app that reads from AWS/SQS and parses the data out using several thread groups. 我有一个相当简单的Java应用程序,它从AWS / SQS读取并使用多个线程组解析出数据。
Threads: 线程数:
I'd like to use NewRelic to see what's happening inside these thread groups but if I put the @Trace(dispatcher=true)
on more than one of the run() functions it stops reading any of them. 我想使用NewRelic来查看这些线程组中发生了什么,但是如果我将
@Trace(dispatcher=true)
放在多个run()函数上,它将停止读取其中的任何一个。 Instead of seeing traces for all of my functions in each thread I'm not seeing much of anything. 我没有看到每个线程中所有函数的痕迹,而是什么也没看到。
Question: 题:
FWIW - NewRelic transaction traces won't be reported for run() functions if they never exit. FWIW-如果Run()函数永不退出,则不会报告NewRelic事务跟踪。
EG: 例如:
public void run() {
while(true) {
// do some tasks
}
}
What you can do is put @Trace
statements on anything that gets called from the run() loop. 您可以做的是将
@Trace
语句放在从run()循环调用的任何内容上。 If these functions exit then traces will get reported back to NR. 如果这些功能退出,则跟踪将报告回NR。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.