Interface DTXAction


  • public interface DTXAction
    • Method Detail

      • leaveAction

        void leaveAction()
        Completes this action and prepares the data for the next sending interval.

        When an outer/parent action is exited, all nested/child actions are automatically closed.

      • reportEvent

        void reportEvent​(String eventName)
        Reports the time when a specific event occurred. This event can be used to determine when a user passed through a specific part of your application. The reportEvent method is a simple way to track user behavior in your application.
        Parameters:
        eventName - name of the event
      • reportValue

        void reportValue​(String valueName,
                         int value)
        Reports a key-value pair with the time at which this event occurred. This event can be used to report important measurement data.
        Parameters:
        valueName - name of the value
        value - an int value from Integer.MIN_VALUE through Integer.MAX_VALUE
      • reportValue

        void reportValue​(String valueName,
                         long value)
        Reports a key-value pair with the time at which this event occurred. This event can be used to report important measurement data.
        Parameters:
        valueName - name of the value
        value - a long value from Long.MIN_VALUE through Long.MAX_VALUE
        Since:
        8.197
      • reportValue

        void reportValue​(String valueName,
                         double value)
        Reports a key-value pair with the time at which this event occurred. This event can be used to report important measurement data.
        Parameters:
        valueName - data name of the value
        value - a double value
      • reportValue

        void reportValue​(String valueName,
                         String value)
        Reports a key-value pair with the time at which this event occurred. This event can be used to report important measurement data.
        Parameters:
        valueName - data name of the value
        value - a String value
      • reportError

        void reportError​(String errorName,
                         int errorCode)
        Reports an error as key-value pair with the time at which it occurred. This event can be used to report error codes.
        Parameters:
        errorName - error name
        errorCode - integer error code
      • reportError

        void reportError​(String errorName,
                         Throwable throwable)
        Reports an error as Throwable with the time at which it occurred. This event can be used to report a handled exception.
        Parameters:
        errorName - error name
        throwable - a caught exception
      • cancel

        void cancel()
        Cancels this action and discards all associated data
        Since:
        8.231
      • tagRequest

        void tagRequest​(HttpURLConnection conn)
        Places a Dynatrace request tag on the web request, which is evaluated by the corresponding web server agent. The Dynatrace server will link the server-side PurePath data with this mobile user action.
        Parameters:
        conn - object to tag
      • isFinished

        boolean isFinished()
        Returns true if this action is completed. Completion may be due to normal finalization, extraordinary termination (like agent shutdown) or cancellation. In all of these cases, this method will return true. Further interactions on finished actions are not allowed and should be avoided.
        Returns:
        true, if action is finished
        Since:
        8.231
      • getRequestTag

        String getRequestTag()
        Generates a Dynatrace request tag for a web request, which has to be manually added as http header (header key can be obtained with the method Dynatrace.getRequestTagHeader()). The tag value is evaluated by the corresponding web server agent. The Dynatrace server will link the server-side PurePath data with this mobile user action.
        Returns:
        the request tag value or an empty string, if the mobile agent is not active
        See Also:
        Dynatrace.getRequestTag()