Class VariantConfiguration

java.lang.Object
com.dynatrace.tools.android.dsl.VariantConfiguration
All Implemented Interfaces:
com.dynatrace.tools.android.api.Configuration, Serializable

public class VariantConfiguration extends Object implements Serializable, com.dynatrace.tools.android.api.Configuration
Encapsulates all variant-specific properties into this DSL object.
See Also:
  • Constructor Details

    • VariantConfiguration

      public VariantConfiguration(String name, org.gradle.internal.reflect.Instantiator instantiator)
      Creates new a VariantConfiguration.
      Parameters:
      name - name of the configuration
      instantiator - instantiator that can create instances from classes
  • Method Details

    • getName

      public String getName()
      Name of the variant-specific configuration.
      Returns:
      name of the variant-specific configuration
    • enabled

      public void enabled(boolean enabled)
      Specifies if the variant should be instrumented.

      The default value is true.

      Parameters:
      enabled - true, if the variant should be instrumented
    • variantFilter

      public void variantFilter(String variantFilter)
      Specifies a regex that will be used to determine the affiliation between this VariantConfiguration an the Android build variants.

      If no value is defined, this VariantConfiguration will match all Android build variants.

      Parameters:
      variantFilter - regex representing the variant filter
    • autoStart

      public void autoStart(Action<? super StartOptions> action)
      Specifies options for the auto start injection feature.

      For more information about the properties you can configure in this block, see StartOptions.

      Parameters:
      action - action object to specific the StartOptions
    • userActions

      public void userActions(Action<? super UserActionOptions> action)
      Specifies options for the user action monitoring feature.

      For more information about the properties you can configure in this block, see UserActionOptions.

      Parameters:
      action - action object to specific the UserActionOptions
    • webRequests

      public void webRequests(Action<? super WebRequestOptions> action)
      Specifies options for the web request monitoring feature.

      For more information about the properties you can configure in this block, see WebRequestOptions.

      Parameters:
      action - action object to specific the WebRequestOptions
    • hybridWebView

      public void hybridWebView(Action<? super HybridOptions> action)
      Specifies options for hybrid web view apps.

      For more information about the properties you can configure in this block, see HybridOptions.

      Parameters:
      action - action object to specific the HybridOptions
    • crashReporting

      public void crashReporting(boolean crashReporting)
      Specifies if the crash reporting feature is enabled

      The default value is true.

      Parameters:
      crashReporting - true, if the crash reporting feature is enabled
    • lifecycle

      public void lifecycle(Action<? super LifecycleOptions> action)
      Specifies options for the lifecycle monitoring feature.

      For more information about the properties you can configure in this block, see LifecycleOptions.

      Parameters:
      action - action object to specific the LifecycleOptions
    • locationMonitoring

      public void locationMonitoring(boolean locationMonitoring)
      Specifies if the location monitoring feature is enabled

      The default value is false.

      Parameters:
      locationMonitoring - true, if the location monitoring feature is enabled
    • userOptIn

      public void userOptIn(boolean userOptIn)
      Specifies if the user has to opt-in for monitoring. The privacy settings must be configured via OneAgent SDK.

      The default value is false.

      Parameters:
      userOptIn - true, if the user has to opt-in for monitoring
    • exclude

      public void exclude(Action<? super ExcludeOptions> action)
      Specifies options for excluding classes and methods from instrumentation.

      For more information about the properties you can configure in this block, see ExcludeOptions.

      Parameters:
      action - action object to specify the ExcludeOptions
    • agentBehavior

      public void agentBehavior(Action<? super AgentBehaviorOptions> action)
      Specifies options that fine-tune the agent behavior.

      For more information about the properties you can configure in this block, see AgentBehaviorOptions.

      Parameters:
      action - action object to specify the AgentBehaviorOptions
      Since:
      8.203
    • behavioralEvents

      public void behavioralEvents(Action<? super BehavioralEventsOptions> action)
      Specifies options for configuring behavioral events.

      For more information about the properties you can configure in this block, see BehavioralEventsOptions.

      Parameters:
      action - action object to specify the BehavioralEventsOptions
      Since:
      8.231
    • debug

      public void debug(Action<? super DebugOptions> action)
      Specifies additional configuration properties that should only be used in special cases like troubleshooting.

      For more information about the properties you can configure in this block, see DebugOptions.

      Parameters:
      action - action object to specific the DebugOptions
    • sessionReplay

      public void sessionReplay(Action<? super SessionReplayOptions> action)
      Specifies options for using session replay.

      For more information about the properties you can configure in this block, see SessionReplayOptions. How to configure Session Replay.

      Parameters:
      action - action object to specific the SessionReplayOptions
      Since:
      8.237
    • isEnabled

      public boolean isEnabled()
      Specifies if the variant should be instrumented

      The default value is true.

      Specified by:
      isEnabled in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      true, if the variant should be instrumented
    • getVariantFilter

      public String getVariantFilter()
      Specifies a regex that will be used to determine the affiliation between this VariantConfiguration an the Android build variants.

      If no value is defined, this VariantConfiguration will match all Android build variants.

      Returns:
      regex representing the variant filter
    • getAutoStart

      public StartOptions getAutoStart()
      Specifies options for the auto start injection feature.

      For more information about the properties you can configure in this block, see StartOptions.

      Specified by:
      getAutoStart in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      options for the auto start injection feature
    • getUserActions

      public UserActionOptions getUserActions()
      Specifies options for the user action monitoring feature.

      For more information about the properties you can configure in this block, see UserActionOptions.

      Specified by:
      getUserActions in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      options for the user action monitoring feature
    • getWebRequests

      public WebRequestOptions getWebRequests()
      Specifies options for the web request monitoring feature.

      For more information about the properties you can configure in this block, see WebRequestOptions.

      Specified by:
      getWebRequests in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      options for the web request monitoring feature
    • getHybridWebView

      public HybridOptions getHybridWebView()
      Specifies options for hybrid web view apps.

      For more information about the properties you can configure in this block, see HybridOptions.

      Specified by:
      getHybridWebView in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      options for hybrid web view apps
    • isCrashReporting

      public boolean isCrashReporting()
      Specifies if the crash reporting feature is enabled

      The default value is true.

      Specified by:
      isCrashReporting in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      true, if the crash reporting feature is enabled
    • getLifecycle

      public LifecycleOptions getLifecycle()
      Specifies options for the lifecycle monitoring feature.

      For more information about the properties you can configure in this block, see LifecycleOptions.

      Specified by:
      getLifecycle in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      options for the lifecycle monitoring feature
    • isLocationMonitoring

      public boolean isLocationMonitoring()
      Specifies if the location monitoring feature is enabled

      The default value is false.

      Specified by:
      isLocationMonitoring in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      true, if the location monitoring feature is enabled
    • isUserOptIn

      public boolean isUserOptIn()
      Specifies if the user has to opt-in for monitoring. The privacy settings must be configured via OneAgent SDK.

      The default value is false.

      Specified by:
      isUserOptIn in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      true, if the user has to opt-in for monitoring
    • getExclude

      public ExcludeOptions getExclude()
      Specifies options for excluding classes and methods from instrumentation.

      For more information about the properties you can configure in this block, see ExcludeOptions.

      Specified by:
      getExclude in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      options for excluding classes and methods from instrumentation
    • getAgentBehavior

      public AgentBehaviorOptions getAgentBehavior()
      Specifies options that fine-tune the agent behavior.

      For more information about the properties you can configure in this block, see AgentBehaviorOptions.

      Specified by:
      getAgentBehavior in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      options for tuning specific agent behavior
      Since:
      8.203
    • getBehavioralEvents

      public BehavioralEventsOptions getBehavioralEvents()
      Specifies options that for configuring behavioral events.

      For more information about the properties you can configure in this block, see BehavioralEventsOptions.

      Specified by:
      getBehavioralEvents in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      options for configuring behavioral events
      Since:
      8.231
    • getDebug

      public DebugOptions getDebug()
      Specifies options

      For more information about the properties you can configure in this block, see DebugOptions.

      Specified by:
      getDebug in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      options
    • getSessionReplay

      public SessionReplayOptions getSessionReplay()
      Specifies options for using session replay.

      For more information about the properties you can configure in this block, see SessionReplayOptions. How to configure Session Replay.

      Specified by:
      getSessionReplay in interface com.dynatrace.tools.android.api.Configuration
      Returns:
      options for configuring session replay
      Since:
      8.237
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object