Package org.glowroot.agent.api
Class Glowroot
java.lang.Object
org.glowroot.agent.api.Glowroot
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addTransactionAttribute
(String name, @Nullable String value) Adds an attribute on the current transaction with the specifiedname
andvalue
.static void
setTransactionName
(@Nullable String transactionName) Set the transaction name that is used for aggregation.static void
FOR ADVANCED USE CASE ONLY.static void
setTransactionSlowThreshold
(long threshold, TimeUnit unit) Overrides the default slow trace threshold (Configuration > General > Slow trace threshold) for the current transaction.static void
setTransactionType
(@Nullable String transactionType) Set the transaction type that is used for aggregation.static void
setTransactionUser
(@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 specifiedname
andvalue
. A transaction's attributes are displayed when viewing a trace on the trace explorer page. Subsequent calls to this method with the samename
on the same transaction will add an additional attribute if there is not already an attribute with the samename
andvalue
. If there is no current transaction then this method does nothing.null
values 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 minimumthreshold
will 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.
-