Class TransactionContext
- java.lang.Object
-
- co.elastic.apm.agent.impl.context.AbstractContext
-
- co.elastic.apm.agent.impl.context.TransactionContext
-
- All Implemented Interfaces:
Recyclable
public class TransactionContext extends AbstractContext
ContextAny arbitrary contextual information regarding the event, captured by the agent, optionally provided by the user
-
-
Field Summary
-
Fields inherited from class co.elastic.apm.agent.impl.context.AbstractContext
REDACTED_CONTEXT_STRING
-
-
Constructor Summary
Constructors Constructor Description TransactionContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCustom(java.lang.String key, boolean value)voidaddCustom(java.lang.String key, java.lang.Number value)voidaddCustom(java.lang.String key, java.lang.String value)voidcopyFrom(TransactionContext other)java.lang.ObjectgetCustom(java.lang.String key)java.util.Iterator<? extends java.util.Map.Entry<java.lang.String,?>>getCustomIterator()RequestgetRequest()RequestResponsegetResponse()UsergetUser()UserbooleanhasCustom()voidonTransactionEnd()voidresetState()resets pooled object state so it can be reused-
Methods inherited from class co.elastic.apm.agent.impl.context.AbstractContext
addLabel, addLabel, addLabel, clearLabels, copyFrom, getLabel, getLabelIterator, getMessage, hasContent, hasLabels
-
-
-
-
Method Detail
-
copyFrom
public void copyFrom(TransactionContext other)
-
getCustom
public java.lang.Object getCustom(java.lang.String key)
-
getResponse
public Response getResponse()
-
addCustom
public void addCustom(java.lang.String key, java.lang.String value)
-
addCustom
public void addCustom(java.lang.String key, java.lang.Number value)
-
addCustom
public void addCustom(java.lang.String key, boolean value)
-
hasCustom
public boolean hasCustom()
-
getCustomIterator
public java.util.Iterator<? extends java.util.Map.Entry<java.lang.String,?>> getCustomIterator()
-
getRequest
public Request getRequest()
RequestIf a log record was generated as a result of a http request, the http interface can be used to collect this information.
-
getUser
public User getUser()
UserDescribes the authenticated User for a request.
-
resetState
public void resetState()
Description copied from interface:Recyclableresets pooled object state so it can be reused- Specified by:
resetStatein interfaceRecyclable- Overrides:
resetStatein classAbstractContext
-
onTransactionEnd
public void onTransactionEnd()
-
-