Package com.dynatrace.android.agent
Interface DTXAction
-
public interface DTXAction
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcancel()Cancels this action and discards all associated dataStringgetRequestTag()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 methodDynatrace.getRequestTagHeader()).StringgetRequestTagHeader()This method is identical toDynatrace.getRequestTagHeader()booleanisFinished()Returns true if this action is completed.voidleaveAction()Completes this action and prepares the data for the next sending interval.voidreportError(String errorName, int errorCode)Reports an error as key-value pair with the time at which it occurred.voidreportError(String errorName, Throwable throwable)Reports an error asThrowablewith the time at which it occurred.voidreportEvent(String eventName)Reports the time when a specific event occurred.voidreportValue(String valueName, double value)Reports a key-value pair with the time at which this event occurred.voidreportValue(String valueName, int value)Reports a key-value pair with the time at which this event occurred.voidreportValue(String valueName, long value)Reports a key-value pair with the time at which this event occurred.voidreportValue(String valueName, String value)Reports a key-value pair with the time at which this event occurred.voidtagRequest(HttpURLConnection conn)Places a Dynatrace request tag on the web request, which is evaluated by the corresponding web server agent.
-
-
-
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. ThereportEventmethod 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 valuevalue- anintvalue 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 valuevalue- alongvalue 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 valuevalue- adoublevalue
-
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 valuevalue- aStringvalue
-
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 nameerrorCode- integer error code
-
reportError
void reportError(String errorName, Throwable throwable)
Reports an error asThrowablewith the time at which it occurred. This event can be used to report a handled exception.- Parameters:
errorName- error namethrowable- 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
-
getRequestTagHeader
String getRequestTagHeader()
This method is identical toDynatrace.getRequestTagHeader()- Returns:
- the request tag header name
-
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 methodDynatrace.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()
-
-