What does the the dispatcher
attribute of the @Trace
annotation for New Relic do? All the examples I can find have it set to true
- what happens if it is set to false?
With New Relic's Java agent, you can track everything from performance issues to tiny errors within your code. Every minute the agent posts metric timeslice and event data to the New Relic user interface, where the owner of that data can sign in and use the data to see how their website is performing.
A transaction trace records the available function calls, database calls, and external calls. You can use transaction traces to troubleshoot performance issues and to get detailed low-level insight into how your app is working.
Basically, dispatcher=true
means "treat this method as the start of a request I want to monitor separately from my other types of requests".
From the documentation on monitoring Java background processes with New Relic:
The
dispatcher=true
option causes the annotated method to be treated like a web transaction--the agent will report errors and transaction traces for the task.
Set to false
, the traced method will not be treated as a transaction itself, and will only show up in New Relic if it's called from a transaction already being reported.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With