Depending on what parameters you set in the @Trace
annotation, you will see different values for the error URL recorded in the New Relic UI for an error in a background task.
Specifying the metricName
and setting dispatcher
to true
, as in
@Trace(metricName = "YourErrorNameHere", dispatcher = true)
will set the displayed URL to YourErrorNameHere
Specifying no metricName
but still setting dispatcher
to true
, as in
@Trace(dispatcher = true)
will set the displayed URL to your class name/method name, such as com.example.task.BackgroundTask/run
If you just use @Trace
by itself without setting dispatcher
to true
, the thread name will be displayed.
We will be updating our documentation in the future to make this clearer.