Package com.newrelic.agent.bridge
Class NoOpSegment
- java.lang.Object
-
- com.newrelic.agent.bridge.NoOpSegment
-
- All Implemented Interfaces:
TracedActivity,com.newrelic.api.agent.AttributeHolder,com.newrelic.api.agent.Segment
public class NoOpSegment extends java.lang.Object implements TracedActivity
-
-
Field Summary
Fields Modifier and Type Field Description static NoOpSegmentINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCustomAttribute(java.lang.String key, boolean value)voidaddCustomAttribute(java.lang.String key, java.lang.Number value)voidaddCustomAttribute(java.lang.String key, java.lang.String value)voidaddCustomAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)voidaddOutboundRequestHeaders(com.newrelic.api.agent.OutboundHeaders outboundHeaders)voidend()voidendAsync()voidfinish()Stop timing the activity.voidfinish(java.lang.Throwable t)Stop timing the activity.TracedMethodgetTracedMethod()Returns the underlyingTracedMethodof this activity.com.newrelic.api.agent.TransactiongetTransaction()voidignore()voidignoreIfUnfinished()Do not report this activity in its parent transaction.voidreportAsExternal(com.newrelic.api.agent.ExternalParameters externalParameters)voidsetAsyncThreadName(java.lang.String threadName)This method has been deprecated as it does not do what it was originally intended to do.voidsetMetricName(java.lang.String... metricNameParts)
-
-
-
Field Detail
-
INSTANCE
public static final NoOpSegment INSTANCE
-
-
Method Detail
-
getTracedMethod
public TracedMethod getTracedMethod()
Description copied from interface:TracedActivityReturns the underlyingTracedMethodof this activity. Normal api calls (e.g. Datastore, external) can be applied to the returned traced method as long as the activity is not finished.- Specified by:
getTracedMethodin interfaceTracedActivity
-
setAsyncThreadName
public void setAsyncThreadName(java.lang.String threadName)
Description copied from interface:TracedActivityThis method has been deprecated as it does not do what it was originally intended to do. Functionally it is a NoOp method.- Specified by:
setAsyncThreadNamein interfaceTracedActivity
-
ignoreIfUnfinished
public void ignoreIfUnfinished()
Description copied from interface:TracedActivityDo not report this activity in its parent transaction. Has no effect if the activity is finished.- Specified by:
ignoreIfUnfinishedin interfaceTracedActivity
-
finish
public void finish()
Description copied from interface:TracedActivityStop timing the activity. Only the first call to this method will have an effect.- Specified by:
finishin interfaceTracedActivity
-
finish
public void finish(java.lang.Throwable t)
Description copied from interface:TracedActivityStop timing the activity. Only the first call to this method will have an effect.- Specified by:
finishin interfaceTracedActivity- Parameters:
t- an error to pass to the agent. Note that this error is not automatically reported to APM.
-
setMetricName
public void setMetricName(java.lang.String... metricNameParts)
- Specified by:
setMetricNamein interfacecom.newrelic.api.agent.Segment
-
reportAsExternal
public void reportAsExternal(com.newrelic.api.agent.ExternalParameters externalParameters)
- Specified by:
reportAsExternalin interfacecom.newrelic.api.agent.Segment
-
addOutboundRequestHeaders
public void addOutboundRequestHeaders(com.newrelic.api.agent.OutboundHeaders outboundHeaders)
- Specified by:
addOutboundRequestHeadersin interfacecom.newrelic.api.agent.Segment
-
getTransaction
public com.newrelic.api.agent.Transaction getTransaction()
- Specified by:
getTransactionin interfacecom.newrelic.api.agent.Segment
-
ignore
public void ignore()
- Specified by:
ignorein interfacecom.newrelic.api.agent.Segment
-
end
public void end()
- Specified by:
endin interfacecom.newrelic.api.agent.Segment
-
endAsync
public void endAsync()
- Specified by:
endAsyncin interfacecom.newrelic.api.agent.Segment
-
addCustomAttribute
public void addCustomAttribute(java.lang.String key, java.lang.Number value)- Specified by:
addCustomAttributein interfacecom.newrelic.api.agent.AttributeHolder
-
addCustomAttribute
public void addCustomAttribute(java.lang.String key, java.lang.String value)- Specified by:
addCustomAttributein interfacecom.newrelic.api.agent.AttributeHolder
-
addCustomAttribute
public void addCustomAttribute(java.lang.String key, boolean value)- Specified by:
addCustomAttributein interfacecom.newrelic.api.agent.AttributeHolder
-
addCustomAttributes
public void addCustomAttributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
- Specified by:
addCustomAttributesin interfacecom.newrelic.api.agent.AttributeHolder
-
-