Package org.glowroot.agent.api
Class Glowroot
java.lang.Object
org.glowroot.agent.api.Glowroot
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddTransactionAttribute(String name, @Nullable String value) Adds an attribute on the current transaction with the specifiednameandvalue.static voidsetTransactionName(@Nullable String transactionName) Set the transaction name that is used for aggregation.static voidFOR ADVANCED USE CASE ONLY.static voidsetTransactionSlowThreshold(long threshold, TimeUnit unit) Overrides the default slow trace threshold (Configuration > General > Slow trace threshold) for the current transaction.static voidsetTransactionType(@Nullable String transactionType) Set the transaction type that is used for aggregation.static voidsetTransactionUser(@Nullable String user) Sets the user attribute on the transaction.
-
Method Details
-
setTransactionType
Set the transaction type that is used for aggregation. If there is no current transaction then this method does nothing. -
setTransactionName
Set the transaction name that is used for aggregation. If there is no current transaction then this method does nothing. -
setTransactionUser
Sets the user attribute on the transaction. If there is no current transaction then this method does nothing. -
addTransactionAttribute
Adds an attribute on the current transaction with the specifiednameandvalue. A transaction's attributes are displayed when viewing a trace on the trace explorer page. Subsequent calls to this method with the samenameon the same transaction will add an additional attribute if there is not already an attribute with the samenameandvalue. If there is no current transaction then this method does nothing.nullvalues are normalized to the empty string. -
setTransactionSlowThreshold
Overrides the default slow trace threshold (Configuration > General > Slow trace threshold) for the current transaction. This can be used to store particular traces at a lower or higher threshold than the general threshold. If this is called multiple times for a given transaction, the minimumthresholdwill be used. If there is no current transaction then this method does nothing. -
setTransactionOuter
public static void setTransactionOuter()FOR ADVANCED USE CASE ONLY. This should be used in very limited circumstances. E.g. a really long "outer" transaction that processes thousands of objects, where it is useful to track the processing details per object as separate transactions, but also useful to track the overarching long "outer" transaction. If there is no current transaction then this method does nothing.
-