Class UserActionConfiguration

java.lang.Object
com.dynatrace.agent.api.UserActionConfiguration

public final class UserActionConfiguration extends Object
Configuration for creating a user action triggered via API Dynatrace.createUserAction(UserActionConfiguration).
Since:
8.343
  • Constructor Details

    • UserActionConfiguration

      public UserActionConfiguration(String customName)
      Creates a configuration for an API user action with the given name.

      The provided customName is stored unchanged and the following name validation is performed when the user action completes:

      • A null name or a name that is empty/blank will cause the user action event to be discarded.
      • Names longer than 5000 characters are truncated to 5000 characters.
      Parameters:
      customName - the name of the user action
  • Method Details

    • withCompleteAutomatically

      public UserActionConfiguration withCompleteAutomatically(boolean enabled)
      Sets the initial completeAutomatically behaviour for this user action. The default value is false.

      When true, the user action will be closed automatically once the pending web request or navigation events for this action complete. When false, the user action remains open until UserAction.complete() is called or the action reaches its maximum duration.

      This value can be overridden while the action is active via UserAction.setCompleteAutomatically(boolean).

      Parameters:
      enabled - true to enable automatic completion; false otherwise
      Returns:
      this instance for method chaining
    • getCustomName

      public String getCustomName()
      Returns the custom name provided at construction time.
      Returns:
      the user action name; may be null or empty if the caller supplied such a value
    • isCompleteAutomatically

      public boolean isCompleteAutomatically()
      Returns the initial value of the completeAutomatically flag.
      Returns:
      true if automatic completion is enabled; false otherwise