public final class NoOpTracer extends java.lang.Object implements Tracer
| Constructor and Description |
|---|
NoOpTracer() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomAttribute(java.lang.String key,
boolean value) |
void |
addCustomAttribute(java.lang.String key,
java.lang.Number value) |
void |
addCustomAttribute(java.lang.String key,
java.lang.String value) |
void |
addCustomAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes) |
void |
addExclusiveRollupMetricName(java.lang.String... metricNameParts) |
void |
addOutboundRequestHeaders(com.newrelic.api.agent.OutboundHeaders outboundHeaders) |
void |
addRollupMetricName(java.lang.String... metricNameParts) |
void |
childTracerFinished(Tracer child)
Tells the tracer when a child tracer finished.
|
void |
finish(int opcode,
java.lang.Object returnValue) |
void |
finish(java.lang.Throwable throwable) |
java.lang.Object |
getAgentAttribute(java.lang.String key)
Returns the specific object for the input key in the map of attributes used to store extra information about the
invocation (Like the sql statement for a sql tracer).
|
java.util.Map<java.lang.String,java.lang.Object> |
getAgentAttributes()
A map of attributes used to store extra information about the invocation (Like the sql statement for a sql
tracer).
|
int |
getChildCount() |
ClassMethodSignature |
getClassMethodSignature() |
java.util.Map<java.lang.String,java.lang.Object> |
getCustomAttributes()
A map of attributes the customer has added to the tracer
|
long |
getDuration()
Get the duration of the method invocation in nanoseconds.
|
long |
getDurationInMilliseconds()
Get the duration of the method invocation in milliseconds.
|
long |
getEndTime()
Get the end time of the method invocation in nanoseconds.
|
long |
getEndTimeInMilliseconds()
Get the end time of the method invocation in milliseconds.
|
java.lang.Throwable |
getException()
Returns the exception, if any, that was noticed by the API or thrown by the tracer.
|
long |
getExclusiveDuration()
Get the duration in nanoseconds of the tracer minus the duration of all child tracers.
|
com.newrelic.api.agent.ExternalParameters |
getExternalParameters() |
java.lang.String |
getGuid()
Gets the random identifier of this Tracer.
|
java.lang.String |
getMetricName()
The metric name of this tracer.
|
com.newrelic.agent.bridge.TracedMethod |
getParentTracedMethod() |
Tracer |
getParentTracer()
Returns the parent tracer or null if this is the root tracer.
|
long |
getRunningDurationInNanos()
Returns the elapsed time since the start time of the transaction up until now if the tracer is still running, or
the final duration if the tracer has finished.
|
long |
getStartTime()
Get the start time of the method invocation in nanoseconds.
|
long |
getStartTimeInMillis() |
long |
getStartTimeInMilliseconds()
Get the start time of the method invocation in milliseconds.
|
TransactionActivity |
getTransactionActivity() |
TransactionSegment |
getTransactionSegment(TransactionTracerConfig ttConfig,
SqlObfuscator sqlObfuscator,
long startTime,
TransactionSegment lastSibling) |
java.lang.String |
getTransactionSegmentName()
The name of this tracer in a transaction trace segment.
|
java.lang.String |
getTransactionSegmentUri()
The uri of this tracer in a tranaction trace segment.
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
boolean |
isAsync() |
boolean |
isChildHasStackTrace()
True means a child has taken a stack trace and therefore this tracer should not take one.
|
boolean |
isLeaf() |
boolean |
isMetricProducer() |
boolean |
isParent()
Does the tracer have any children?
|
boolean |
isTrackCallbackRunnable() |
boolean |
isTransactionSegment()
Returns true if this tracer should participate in transaction trace.
|
void |
markFinishTime() |
void |
nameTransaction(com.newrelic.agent.bridge.TransactionNamePriority namePriority) |
void |
readInboundResponseHeaders(com.newrelic.api.agent.InboundHeaders inboundResponseHeaders) |
void |
removeAgentAttribute(java.lang.String key)
Remove attribute.
|
void |
removeTransactionSegment() |
void |
reportAsExternal(com.newrelic.api.agent.ExternalParameters externalParameters) |
void |
reportAsExternal(com.newrelic.agent.bridge.external.ExternalParameters externalParameters) |
void |
setAgentAttribute(java.lang.String key,
java.lang.Object value)
Add some extra information to the invocation (Like the sql statement for a sql tracer).
|
void |
setCustomMetricPrefix(java.lang.String prefix) |
void |
setMetricName(java.lang.String... metricNameParts) |
void |
setMetricNameFormatInfo(java.lang.String metricName,
java.lang.String transactionSegmentName,
java.lang.String transactionSegmentUri) |
void |
setNoticedError(java.lang.Throwable throwable)
Sets an error that was identified by the public API.
|
void |
setParentTracer(Tracer tracer) |
void |
setRollupMetricNames(java.lang.String... metricNames) |
void |
setThrownException(java.lang.Throwable throwable)
Captures the exception that the was thrown during the tracer's execution.
|
void |
setTrackCallbackRunnable(boolean shouldTrack) |
void |
setTrackChildThreads(boolean shouldTrack) |
boolean |
trackChildThreads() |
boolean |
wasExceptionSetByAPI()
Returns true if the exception was set by
ErrorTracer.setNoticedError(Throwable) |
public void setMetricName(java.lang.String... metricNameParts)
setMetricName in interface com.newrelic.api.agent.TracedMethodpublic void setMetricNameFormatInfo(java.lang.String metricName,
java.lang.String transactionSegmentName,
java.lang.String transactionSegmentUri)
public com.newrelic.agent.bridge.TracedMethod getParentTracedMethod()
public void finish(java.lang.Throwable throwable)
finish in interface com.newrelic.agent.bridge.ExitTracerpublic void finish(int opcode,
java.lang.Object returnValue)
finish in interface com.newrelic.agent.bridge.ExitTracerpublic long getDurationInMilliseconds()
TimedItemgetDurationInMilliseconds in interface TimedItempublic long getDuration()
TimedItemgetDuration in interface TimedItempublic java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
invoke in interface java.lang.reflect.InvocationHandlerjava.lang.Throwablepublic boolean isTransactionSegment()
TracerisTransactionSegment in interface Tracerpublic boolean isParent()
Tracerpublic void setParentTracer(Tracer tracer)
setParentTracer in interface Tracerpublic boolean isMetricProducer()
public boolean isChildHasStackTrace()
TracerisChildHasStackTrace in interface Tracerpublic java.lang.String getTransactionSegmentUri()
TracergetTransactionSegmentUri in interface Tracerpublic java.lang.String getTransactionSegmentName()
TracergetTransactionSegmentName in interface Tracerpublic TransactionSegment getTransactionSegment(TransactionTracerConfig ttConfig, SqlObfuscator sqlObfuscator, long startTime, TransactionSegment lastSibling)
getTransactionSegment in interface Tracerpublic long getStartTimeInMilliseconds()
TracergetStartTimeInMilliseconds in interface Tracerpublic long getStartTime()
TracergetStartTime in interface Tracerpublic long getRunningDurationInNanos()
TracergetRunningDurationInNanos in interface Tracerpublic Tracer getParentTracer()
TracergetParentTracer in interface Tracerpublic java.util.Map<java.lang.String,java.lang.Object> getAgentAttributes()
TracergetAgentAttributes in interface Tracerpublic java.util.Map<java.lang.String,java.lang.Object> getCustomAttributes()
TracergetCustomAttributes in interface Tracerpublic void addCustomAttribute(java.lang.String key,
java.lang.Number value)
addCustomAttribute in interface com.newrelic.api.agent.AttributeHolderpublic void addCustomAttribute(java.lang.String key,
java.lang.String value)
addCustomAttribute in interface com.newrelic.api.agent.AttributeHolderpublic void addCustomAttribute(java.lang.String key,
boolean value)
addCustomAttribute in interface com.newrelic.api.agent.AttributeHolderpublic void addCustomAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
addCustomAttributes in interface com.newrelic.api.agent.AttributeHolderpublic java.lang.String getMetricName()
TracergetMetricName in interface TracergetMetricName in interface com.newrelic.api.agent.TracedMethodpublic long getExclusiveDuration()
TracergetExclusiveDuration in interface TimedItemgetExclusiveDuration in interface Tracerpublic long getEndTimeInMilliseconds()
TracergetEndTimeInMilliseconds in interface Tracerpublic long getEndTime()
TracergetEndTime in interface Tracerpublic ClassMethodSignature getClassMethodSignature()
getClassMethodSignature in interface Tracerpublic void childTracerFinished(Tracer child)
TracerchildTracerFinished in interface Tracerpublic int getChildCount()
getChildCount in interface Tracerpublic void setRollupMetricNames(java.lang.String... metricNames)
public void nameTransaction(com.newrelic.agent.bridge.TransactionNamePriority namePriority)
public void addRollupMetricName(java.lang.String... metricNameParts)
addRollupMetricName in interface com.newrelic.api.agent.TracedMethodpublic void addExclusiveRollupMetricName(java.lang.String... metricNameParts)
public void setAgentAttribute(java.lang.String key,
java.lang.Object value)
TracersetAgentAttribute in interface Tracerpublic void removeAgentAttribute(java.lang.String key)
TracerremoveAgentAttribute in interface Tracerkey - attribute to removepublic java.lang.Object getAgentAttribute(java.lang.String key)
TracergetAgentAttribute in interface Tracerpublic TransactionActivity getTransactionActivity()
getTransactionActivity in interface Tracerpublic void setCustomMetricPrefix(java.lang.String prefix)
public void removeTransactionSegment()
removeTransactionSegment in interface Tracerpublic void setTrackChildThreads(boolean shouldTrack)
public boolean trackChildThreads()
public void setTrackCallbackRunnable(boolean shouldTrack)
public boolean isTrackCallbackRunnable()
public void addOutboundRequestHeaders(com.newrelic.api.agent.OutboundHeaders outboundHeaders)
addOutboundRequestHeaders in interface com.newrelic.api.agent.TracedMethodpublic void readInboundResponseHeaders(com.newrelic.api.agent.InboundHeaders inboundResponseHeaders)
public void reportAsExternal(com.newrelic.api.agent.ExternalParameters externalParameters)
reportAsExternal in interface com.newrelic.api.agent.TracedMethodpublic void reportAsExternal(com.newrelic.agent.bridge.external.ExternalParameters externalParameters)
public void markFinishTime()
markFinishTime in interface Tracerpublic java.lang.String getGuid()
ErrorTracergetGuid in interface ErrorTracergetGuid in interface Tracerpublic long getStartTimeInMillis()
getStartTimeInMillis in interface Tracerpublic com.newrelic.api.agent.ExternalParameters getExternalParameters()
getExternalParameters in interface Tracerpublic void setNoticedError(java.lang.Throwable throwable)
ErrorTracersetNoticedError in interface ErrorTracerpublic java.lang.Throwable getException()
ErrorTracergetException in interface ErrorTracerpublic void setThrownException(java.lang.Throwable throwable)
ErrorTracersetThrownException in interface ErrorTracerpublic boolean wasExceptionSetByAPI()
ErrorTracerErrorTracer.setNoticedError(Throwable)wasExceptionSetByAPI in interface ErrorTracer