public interface Action
extends java.io.Closeable
| Modifier and Type | Method and Description |
|---|---|
Action |
cancelAction()
Cancels this
Action. |
long |
getDurationInMilliseconds()
Get the
action's duration in milliseconds. |
Action |
leaveAction()
Leaves this
Action. |
Action |
reportError(java.lang.String errorName,
int errorCode)
Reports an error with a specified name and error code.
|
Action |
reportError(java.lang.String errorName,
int errorCode,
java.lang.String reason)
Deprecated.
with version 2.1.0 Prefer
reportError(String, int), since reason is unhandled. |
Action |
reportError(java.lang.String errorName,
java.lang.String causeName,
java.lang.String causeDescription,
java.lang.String causeStackTrace)
Reports an error with a specified name and fields describing the cause of this error.
|
Action |
reportError(java.lang.String errorName,
java.lang.Throwable throwable)
Reports an error with a specified name and a
Throwable. |
Action |
reportEvent(java.lang.String eventName)
Reports an event with a specified name (but without any value).
|
Action |
reportValue(java.lang.String valueName,
double value)
Reports a
double value with a specified name. |
Action |
reportValue(java.lang.String valueName,
int value)
Reports an
int value with a specified name. |
Action |
reportValue(java.lang.String valueName,
long value)
Reports a
long value with a specified name. |
Action |
reportValue(java.lang.String valueName,
java.lang.String value)
Reports a
String value with a specified name. |
WebRequestTracer |
traceWebRequest(java.lang.String url)
Allows tracing and timing of a web request handled by any 3rd party HTTP Client (e.g.
|
WebRequestTracer |
traceWebRequest(java.net.URLConnection connection)
Traces a web request - which is provided as a URLConnection - and allows adding timing information to this request.
|
Action reportEvent(java.lang.String eventName)
If given eventName is null or an empty String then no event is reported to the system.
eventName - name of the eventAction reportValue(java.lang.String valueName, int value)
int value with a specified name.
If given valueName is null or an empty String then no event is reported to the system.
valueName - name of this valuevalue - value itselfAction reportValue(java.lang.String valueName, long value)
long value with a specified name.
If given valueName is null or an empty String then no event is reported to the system.
valueName - name of this valuevalue - value itselfAction reportValue(java.lang.String valueName, double value)
double value with a specified name.
If given valueName is null or an empty String then no event is reported to the system.
valueName - name of this valuevalue - value itselfAction reportValue(java.lang.String valueName, java.lang.String value)
String value with a specified name.
If given valueName is null or an empty String then no event is reported to the system.
valueName - name of this valuevalue - value itself
The value can be null or an empty String.@Deprecated Action reportError(java.lang.String errorName, int errorCode, java.lang.String reason)
reportError(String, int), since reason is unhandled.
If given errorName is null or an empty String then no event is reported to the system.
errorName - name of this errorerrorCode - numeric error code of this errorreason - reason for this errorAction reportError(java.lang.String errorName, int errorCode)
If given errorName is null or an empty String then no event is reported to the system.
errorName - name of this errorerrorCode - numeric error code of this errorAction reportError(java.lang.String errorName, java.lang.String causeName, java.lang.String causeDescription, java.lang.String causeStackTrace)
If given errorName is null or an empty string then no event is reported to the system.
errorName - name of this errorcauseName - name describing the cause of the error.
E.g. the class name of a caught exception.causeDescription - description what caused the error
E.g. Throwable.getMessage() of a caught exception.causeStackTrace - stack trace of the error
E.g. the Throwable stack traceAction reportError(java.lang.String errorName, java.lang.Throwable throwable)
Throwable.
If given errorName is null or an empty string then no event is reported to the system.
errorName - name of this errorthrowable - Throwable causing this errorWebRequestTracer traceWebRequest(java.net.URLConnection connection)
If given connection is null then no event is reported to the system.
connection - the URLConnection of the HTTP request to be tagged and timedWebRequestTracer traceWebRequest(java.lang.String url)
OpenKitConstants.WEBREQUEST_TAG_HEADER) has to be set manually to the
tag value of this WebRequestTracer.
If given url is null or an empty string then no event is reported to the system.
url - the URL of the web request to be tagged and timedAction leaveAction()
Action.null if there is no parent ActionAction cancelAction()
Action.
Canceling an action is similar to leaving an action, except that
the data and all unfinished child objects are discarded instead of being sent.
null if there is no parent Actionlong getDurationInMilliseconds()
action's duration in milliseconds.
The duration of an Action is equal to the current timestamp - start timestamp, if the
action is still open, or end timestamp - start timestamp if leaveAction() or
cancelAction() was already called.
Action.