Is there a way to capture the Thread Name for Business Transactions in Java?
I see RequestGUID and URL are captured when looking through the UI.
Thanks.
It might not be what you were thinking, but you can split your BT's by thread name in the instrumentation settings for business transactions.
It works for any existing BT and I've used this for several apps that I needed a given by-thread confirmation or identification of the "flow" to correlate with single procs, or to use in conjunction with other tool's additional insights where my AppD Transaction ID isn't tag-n-trace through the 3rd party tools I may have to use in unique cases where AppD can't cover those apps/tools.
I also use this method by "Thread ID" at times, which can be very valuable when attempting to determine if a third party's app is ACTUALLY spreading load across the threads, or operating in a single-threaded fashion. This is actually a feature that using this way, takes hours/days vs what would have taken you months to find in log analysis alone.
FYI - Above is just a "catch all for anything, split all the things" example. I would highly recommend you don't use this in Prod as it will likely impact your instances quite seriously. Instead, try to find your starting point by the given class + method if possible, and then split by thread ID or thread Name.
IDK if that's exactly what you were looking for, but I hope it helps! 🙂
Hi @Stephen.Knott,
Did you see the most recent reply from Michael?
It might not be what you were thinking, but you can split your BT's by thread name in the instrumentation settings for business transactions.
It works for any existing BT and I've used this for several apps that I needed a given by-thread confirmation or identification of the "flow" to correlate with single procs, or to use in conjunction with other tool's additional insights where my AppD Transaction ID isn't tag-n-trace through the 3rd party tools I may have to use in unique cases where AppD can't cover those apps/tools.
I also use this method by "Thread ID" at times, which can be very valuable when attempting to determine if a third party's app is ACTUALLY spreading load across the threads, or operating in a single-threaded fashion. This is actually a feature that using this way, takes hours/days vs what would have taken you months to find in log analysis alone.
FYI - Above is just a "catch all for anything, split all the things" example. I would highly recommend you don't use this in Prod as it will likely impact your instances quite seriously. Instead, try to find your starting point by the given class + method if possible, and then split by thread ID or thread Name.
IDK if that's exactly what you were looking for, but I hope it helps! 🙂
Thank you. I think you just confirmed I would need to write code.
It is strange that AppD does have this information (it can split on ThreadId/ThreadName), but it won't let you see this information within business transactions screens.
Hi @Stephen.Knott,
I know we are coming back from the holidays. I wanted to bump this conversation to see if you could check out Mario's reply.
If the reply helped, please click the Accept as Solution button, if not and you need more help, reply to keep the conversation going.
Hi Stephen
What would be your reason for wanting to capture the thread name? Are you referring to having the Business transactions named after the threads instead of the URL's? Or do you just want to extract the thread name as part of the business transaction under data collectors?
The Thread Name would be useful in coordinating with logs. Without any changes to apps, most apps print out thread names in their logging pattern. RequestGUID would not show up unless we plugged in something and made a very specific call and that would mean modifying all apps/all calls to retrieve it once per transaction.
Was hoping it could be retrieve or there would be a trick to make one of the Data Collectors call currentThread.getName to log it with requestGUID.
Thanks.