DeejUK
DeejUK

Reputation: 13501

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

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?

Upvotes: 8

Views: 6751

Answers (1)

rkb
rkb

Reputation: 3542

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.

Upvotes: 12

Related Questions