public @interface Trace
If you annotate a method with the Trace annotation it will be automatically timed by the New Relic agent with the
calls per minute
total call time
standard deviation call time
min call time
max call time
A metric representing these measurements will be reporting inside the call scope of the current transaction (e.g.,
"/servlets/myservlet") so that New Relic can "break out" the response time of a given transaction by specific called
methods. A rollup summary metric (all invocations of the method for every transaction) will also be reported.
Be mindful when using this annotation. When placed on relatively heavyweight operations such as database access or
webservice invocation, its overhead will be negligible. On the other hand, if placed on a tight, frequently called
method (e.g., an accessor that is called thousands of times per second), then the tracer will introduce higher
overhead to your application.
Sets the metric name for this tracer. If unspecified, the class / method name will be used.
The metric name for this tracer.
Specifies one or more rollup metrics names. When the tracer finishes, an unscoped metric (a metric which is not
scoped to a specific transaction) will be recorded with the given metric name. This is useful when you want to
record a summary value across multiple methods or transaction names.
One or more rollup metric names.
If true, this method will be considered the start of a transaction. When this method is invoked within the
context of an existing transaction this has no effect. If false and this method is invoked outside a transaction,
then this tracer will not be reported.
True if this method should start a transaction if one has not already been started.
Names the current transaction using this tracer's metric name.
True if this traced method should be used to name the transaction, else false.
True if this transaction should be ignored, else false.
Excludes this traced method from transaction traces. Metric data is still generated.
True if this traced method should be excluded from transaction traces, else false.
A leaf tracer will not have any child tracers. This is useful when all time should be attributed to the tracer
even if other trace points are encountered during its execution. For example, database tracers often act as leaf
so that all time is attributed to database activity even if instrumented external calls are made.
If a leaf tracer does not participate in transaction traces (excludeFromTransactionTrace()) the agent
can create a tracer with lower overhead.
True if this traced method should be a leaf, else false.
Tells the agent that this method is asynchronous and that it should be traced if the method is linked to an
true if this method is asynchronous and it should be traced in the current transaction.