Package com.newrelic.agent.bridge
Interface Transaction
-
- All Superinterfaces:
com.newrelic.api.agent.Transaction
- All Known Implementing Classes:
NoOpTransaction
public interface Transaction extends com.newrelic.api.agent.TransactionThe internal bridge version of Transaction.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidacceptDistributedTracePayload(com.newrelic.api.agent.DistributedTracePayload payload)Accept a distributed trace payload.voidacceptDistributedTracePayload(java.lang.String payload)Accept a distributed trace payload.voidaddOutboundResponseHeaders()Deprecated.voidbeforeSendResponseHeaders()Deprecated.booleanclearTransaction()voidconvertToWebTransaction()Deprecated.TracedActivitycreateAndStartTracedActivity()Deprecated.com.newrelic.api.agent.DistributedTracePayloadcreateDistributedTracePayload()Create a distributed trace payload.voidexpireAllTokens()Expires all tokens associated with the current transaction.voidfinishFlyweightTracer(TracedMethod parent, long startInNanos, long finishInNanos, java.lang.String className, java.lang.String methodName, java.lang.String methodDesc, java.lang.String metricName, java.lang.String[] rollupMetricNames)java.util.Map<java.lang.String,java.lang.Object>getAgentAttributes()CrossProcessStategetCrossProcessState()TokengetToken()Deprecated.java.util.Map<java.lang.String,java.lang.Object>getUserAttributes()WebResponsegetWebResponse()Deprecated.voidignoreErrors()Ignore throwable and http status code errors resulting from this transaction.booleanisAutoAppNamingEnabled()booleanisStarted()booleanisWebRequestSet()Deprecated.booleanisWebResponseSet()Deprecated.booleanisWebTransaction()Deprecated.booleanmarkFirstByteOfResponse()Does not affect APM UI.booleanmarkLastByteOfResponse()Does not affect APM UI.voidmarkResponseAtTxaEnd()Deprecated.booleanmarkResponseSent()Deprecated.voidprovideHeaders(com.newrelic.api.agent.InboundHeaders headers)Provide a headers collection to be processed for NewRelic-defined synthetics, CAT, or beacon (RUM) header keysbooleanregisterAsyncActivity(java.lang.Object activityContext)Deprecated.voidrequestDestroyed()Called from servlet containers when a request is destroyed to finish the current web transaction.voidrequestInitialized(com.newrelic.api.agent.Request request, com.newrelic.api.agent.Response response)Called from servlet containers when a request is initiated.voidsaveMessageParameters(java.util.Map<java.lang.String,java.lang.String> parameters)voidsetApplicationName(ApplicationNamePriority priority, java.lang.String appName)Sets the name of the application as reported in the New Relic UI.booleansetTransactionName(TransactionNamePriority namePriority, boolean override, java.lang.String category, java.lang.String... parts)Sets the current transaction's name.voidsetTransportType(com.newrelic.api.agent.TransportType transportType)voidsetWebRequest(com.newrelic.api.agent.Request request)Deprecated.voidsetWebResponse(com.newrelic.api.agent.Response response)Deprecated.TracedMethodstartFlyweightTracer()Starts a flyweight tracer and returns the parent tracer.-
Methods inherited from interface com.newrelic.api.agent.Transaction
acceptDistributedTraceHeaders, getLastTracer, getRequestMetadata, getResponseMetadata, getSecurityMetaData, getTracedMethod, ignore, ignoreApdex, insertDistributedTraceHeaders, isTransactionNameSet, processRequestMetadata, processResponseMetadata, processResponseMetadata, setTransactionName, setWebRequest, startSegment, startSegment
-
-
-
-
Method Detail
-
getAgentAttributes
java.util.Map<java.lang.String,java.lang.Object> getAgentAttributes()
-
getUserAttributes
java.util.Map<java.lang.String,java.lang.Object> getUserAttributes()
-
setTransactionName
boolean setTransactionName(TransactionNamePriority namePriority, boolean override, java.lang.String category, java.lang.String... parts)
Sets the current transaction's name.- Parameters:
namePriority-override- Overrides the current transaction name if it has the same priority level (or lower).category-parts-
-
beforeSendResponseHeaders
@Deprecated void beforeSendResponseHeaders()
Deprecated.
-
addOutboundResponseHeaders
@Deprecated void addOutboundResponseHeaders()
Deprecated.- Specified by:
addOutboundResponseHeadersin interfacecom.newrelic.api.agent.Transaction
-
isStarted
boolean isStarted()
-
setApplicationName
void setApplicationName(ApplicationNamePriority priority, java.lang.String appName)
Sets the name of the application as reported in the New Relic UI.- Parameters:
priority-appName-
-
isAutoAppNamingEnabled
boolean isAutoAppNamingEnabled()
-
isWebRequestSet
@Deprecated boolean isWebRequestSet()
Deprecated.- Returns:
-
isWebResponseSet
@Deprecated boolean isWebResponseSet()
Deprecated.- Returns:
-
setWebRequest
@Deprecated void setWebRequest(com.newrelic.api.agent.Request request)
Deprecated.- Parameters:
request- The current transaction's request.
-
setWebResponse
@Deprecated void setWebResponse(com.newrelic.api.agent.Response response)
Deprecated.- Specified by:
setWebResponsein interfacecom.newrelic.api.agent.Transaction- Parameters:
response- The current transaction's response.
-
provideHeaders
void provideHeaders(com.newrelic.api.agent.InboundHeaders headers)
Provide a headers collection to be processed for NewRelic-defined synthetics, CAT, or beacon (RUM) header keys- Parameters:
headers- a headers collection
-
getWebResponse
@Deprecated WebResponse getWebResponse()
Deprecated.- Returns:
-
convertToWebTransaction
@Deprecated void convertToWebTransaction()
Deprecated.- Specified by:
convertToWebTransactionin interfacecom.newrelic.api.agent.Transaction
-
isWebTransaction
@Deprecated boolean isWebTransaction()
Deprecated.- Specified by:
isWebTransactionin interfacecom.newrelic.api.agent.Transaction- Returns:
-
ignoreErrors
void ignoreErrors()
Ignore throwable and http status code errors resulting from this transaction.- Specified by:
ignoreErrorsin interfacecom.newrelic.api.agent.Transaction
-
requestInitialized
void requestInitialized(com.newrelic.api.agent.Request request, com.newrelic.api.agent.Response response)Called from servlet containers when a request is initiated. This starts a transaction which will be completed whenrequestDestroyed()is invoked.- Parameters:
request-response-
-
requestDestroyed
void requestDestroyed()
Called from servlet containers when a request is destroyed to finish the current web transaction.
-
saveMessageParameters
void saveMessageParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
- Parameters:
parameters-
-
getCrossProcessState
CrossProcessState getCrossProcessState()
-
startFlyweightTracer
TracedMethod startFlyweightTracer()
Starts a flyweight tracer and returns the parent tracer.- Returns:
-
finishFlyweightTracer
void finishFlyweightTracer(TracedMethod parent, long startInNanos, long finishInNanos, java.lang.String className, java.lang.String methodName, java.lang.String methodDesc, java.lang.String metricName, java.lang.String[] rollupMetricNames)
- Parameters:
parent-startInNanos-finishInNanos-className-methodName-methodDesc-metricName-rollupMetricNames-
-
registerAsyncActivity
@Deprecated boolean registerAsyncActivity(java.lang.Object activityContext)
Deprecated.- Parameters:
activityContext- the key used by instrumentation to identify this asynchronous activity. The value must be unique across all asynchronous activities tracked during the life of the current Agent instance.- Returns:
- true if the registration succeeded else false
-
markFirstByteOfResponse
boolean markFirstByteOfResponse()
Does not affect APM UI. SeemarkResponseSent()to set the response time. Marks the time when the first byte of the response left the server. This time can only be set once. After the first setting, all other attempts to set the time will fail and return false.- Returns:
- True if the time to first byte was successfully set.
-
markLastByteOfResponse
boolean markLastByteOfResponse()
Does not affect APM UI. SeemarkResponseSent()to set the response time. Marks the time to last byte as right now (as this method is called). This time can only be set once. After the first setting, all other attempts to set the time will fail and return false.- Returns:
- True if the last byte time has not already been set.
-
markResponseAtTxaEnd
@Deprecated void markResponseAtTxaEnd()
Deprecated.
-
markResponseSent
@Deprecated boolean markResponseSent()
Deprecated.- Specified by:
markResponseSentin interfacecom.newrelic.api.agent.Transaction- Returns:
- True if the call to set the response time was successful
-
getToken
@Deprecated Token getToken()
Deprecated.- Specified by:
getTokenin interfacecom.newrelic.api.agent.Transaction- Returns:
- A token to pass to another thread with work for the current transaction.
-
expireAllTokens
void expireAllTokens()
Expires all tokens associated with the current transaction. The transaction will then end when all currently running work then finishes.
-
clearTransaction
boolean clearTransaction()
-
createAndStartTracedActivity
@Deprecated TracedActivity createAndStartTracedActivity()
Deprecated.- Returns:
- a new traced activity, if successful. Will return null if the circuit breaker is tripped, if the transaction has not started, or if the transaction is ignored.
-
createDistributedTracePayload
com.newrelic.api.agent.DistributedTracePayload createDistributedTracePayload()
Create a distributed trace payload.- Specified by:
createDistributedTracePayloadin interfacecom.newrelic.api.agent.Transaction- Returns:
- a
DistributedTracePayload
-
acceptDistributedTracePayload
void acceptDistributedTracePayload(java.lang.String payload)
Accept a distributed trace payload.- Specified by:
acceptDistributedTracePayloadin interfacecom.newrelic.api.agent.Transaction- Parameters:
payload-DistributedTracePayloadto accept
-
acceptDistributedTracePayload
void acceptDistributedTracePayload(com.newrelic.api.agent.DistributedTracePayload payload)
Accept a distributed trace payload.- Specified by:
acceptDistributedTracePayloadin interfacecom.newrelic.api.agent.Transaction- Parameters:
payload-DistributedTracePayloadto accept
-
setTransportType
void setTransportType(com.newrelic.api.agent.TransportType transportType)
-
-