Class Glowroot

java.lang.Object
org.glowroot.agent.api.Glowroot

public class Glowroot extends Object
  • Method Details

    • setTransactionType

      public static void setTransactionType(@Nullable String transactionType)
      Set the transaction type that is used for aggregation. If there is no current transaction then this method does nothing.
    • setTransactionName

      public static void setTransactionName(@Nullable String transactionName)
      Set the transaction name that is used for aggregation. If there is no current transaction then this method does nothing.
    • setTransactionUser

      public static void setTransactionUser(@Nullable String user)
      Sets the user attribute on the transaction. If there is no current transaction then this method does nothing.
    • addTransactionAttribute

      public static void addTransactionAttribute(String name, @Nullable String value)
      Adds an attribute on the current transaction with the specified name and value. A transaction's attributes are displayed when viewing a trace on the trace explorer page. Subsequent calls to this method with the same name on the same transaction will add an additional attribute if there is not already an attribute with the same name and value. If there is no current transaction then this method does nothing. null values are normalized to the empty string.
    • setTransactionSlowThreshold

      public static void setTransactionSlowThreshold(long threshold, TimeUnit unit)
      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 minimum threshold 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.