Package com.dynatrace.agent.api
Class UserActionConfiguration
java.lang.Object
com.dynatrace.agent.api.UserActionConfiguration
Configuration for creating a user action triggered via API
Dynatrace.createUserAction(UserActionConfiguration).- Since:
- 8.343
-
Constructor Summary
ConstructorsConstructorDescriptionUserActionConfiguration(String customName) Creates a configuration for an API user action with the given name. -
Method Summary
Modifier and TypeMethodDescriptionReturns the custom name provided at construction time.booleanReturns the initial value of thecompleteAutomaticallyflag.withCompleteAutomatically(boolean enabled) Sets the initialcompleteAutomaticallybehaviour for this user action.
-
Constructor Details
-
UserActionConfiguration
Creates a configuration for an API user action with the given name.The provided
customNameis stored unchanged and the following name validation is performed when the user action completes:- A
nullname 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
- A
-
-
Method Details
-
withCompleteAutomatically
Sets the initialcompleteAutomaticallybehaviour for this user action. The default value isfalse.When
true, the user action will be closed automatically once the pending web request or navigation events for this action complete. Whenfalse, the user action remains open untilUserAction.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-trueto enable automatic completion;falseotherwise- Returns:
- this instance for method chaining
-
getCustomName
Returns the custom name provided at construction time.- Returns:
- the user action name; may be
nullor empty if the caller supplied such a value
-
isCompleteAutomatically
public boolean isCompleteAutomatically()Returns the initial value of thecompleteAutomaticallyflag.- Returns:
trueif automatic completion is enabled;falseotherwise
-