Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What Does "Dispatcher" do on NewRelic's @Trace Annotation

Tags:

java

newrelic

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?

like image 357
EngineerBetter_DJ Avatar asked Jun 14 '12 15:06

EngineerBetter_DJ


People also ask

How does New Relic Java agent work?

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.

What is trace in Newrelic?

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.


1 Answers

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.

like image 177
rkb Avatar answered Oct 20 '22 15:10

rkb