Splunk MINT SDK for Android
5.0
|
Static Public Member Functions | |
static void | initAndStartSession (final Context context, final String apiKey) |
static void | initAndStartSessionHEC (final Context context, final String url, final String token) |
static synchronized void | startSession (final Context context) |
static synchronized void | closeSession (final Context context) |
static void | flush () |
static void | setSessionInterval (final int timeInSecs) |
static void | setUserOptOut (final boolean optedOut) |
static void | disableNetworkMonitoring () |
static final void | setMintCallback (MintCallback mintCallback) |
static void | leaveBreadcrumb (final String breadcrumb) |
static void | logView (final String view) |
static void | logView (final String view, final String key, final String value) |
static void | logView (final String view, HashMap< String, Object > extraData) |
static void | logEvent (final String eventName) |
static void | logEvent (final String eventName, final MintLogLevel logLevel) |
static void | logEvent (final String eventName, final MintLogLevel logLevel, final HashMap< String, Object > customData) |
static void | logEvent (final String eventName, final MintLogLevel logLevel, final String keyName, final String keyValue) |
static void | setUserIdentifier (final String userIdentifier) |
static void | setApplicationEnvironment (final String environment) |
static void | enableDebugLog () |
static void | setFlushOnlyOverWiFi (boolean enabled) |
static void | transactionStart (final String name) |
static void | transactionStart (final String name, final HashMap< String, Object > customData) |
static void | transactionStart (final String name, final String keyName, final String keyValue) |
static void | transactionStop (final String name) |
static void | transactionStop (final String name, final HashMap< String, Object > customData) |
static void | transactionStop (final String name, final String keyName, final String keyValue) |
static void | transactionCancel (final String name, final String reason) |
static void | transactionCancel (final String name, final String reason, final HashMap< String, Object > customData) |
static void | transactionCancel (final String name, final String reason, final String keyName, final String keyValue) |
static HashMap< String, Object > | getExtraData () |
static void | addExtraData (final String key, String value) |
static void | removeExtraData (final String key) |
static void | clearExtraData () |
static int | getTotalCrashesNum () |
static void | clearTotalCrashesNum () |
static String | getLastCrashID () |
static void | logException (final HashMap< String, Object > customData, final Exception exception) |
static void | logException (final Exception ex) |
static void | logException (final String key, final String value, final Exception exception) |
static void | xamarinException (final Exception exception, final boolean handled, final HashMap< String, Object > customData) |
static void | enableLogging (final boolean enable) |
static void | setLogging (final int lines) |
static void | setLogging (final String filter) |
static void | setLogging (final int lines, final String filter) |
static JSONObject | getDevSettings () |
static void | addURLToBlackList (final String url) |
static final String | getSessionId () |
static final String | getMintUUID () |
Static Public Attributes | |
static final String | appEnvironmentRelease = "Release" |
static final String | appEnvironmentStaging = "Staging" |
static final String | appEnvironmentUserAcceptanceTesting = "UserAcceptanceTesting" |
static final String | appEnvironmentTesting = "Testing" |
static final String | appEnvironmentDevelopment = "Development" |
static final String | XSplunkMintSessionIdHeader = "X-Splunk-Mint-Session-id" |
static final String | XSplunkMintUuidHeader = "X-Splunk-Mint-uuid" |
The Mint class represents the main class for the Splunk MINT SDK for Android.
|
static |
Adds a key-value pair to the extra data.
key | The key. |
value | The value. |
|
static |
Adds a URL to the network monitoring blacklist. Network calls with this URL are ignored.
url | The URL to ignore. |
|
static |
Clears all extra data.
|
static |
Clears the total number of crashes.
|
static |
Closes the active session.
context | The context of the application. |
|
static |
Disables network monitoring. You must call this before the initAndStartSession or initAndStartSessionHEC method.
|
static |
Enables the display of debug messages.
Note You should turn this feature off in production.
|
static |
Enables LogCat logging.
enable | true to enable LogCat logging, false to disable it. |
|
static |
Flushes all saved data.
|
static |
Gets the developer settings from the remote settings.
|
static |
Gets the extra data map. Returns a clone of the extra data HashMap
|
static |
Gets the error hash of the last crash.
null
if no crash.
|
static |
Returns the MINT universally unique identifier (UUID), which uniquely identifies a specific user.
|
static |
Returns the current session ID.
|
static |
Returns the total number of crashes.
|
static |
Use this constructor to initialize and start the session for the MINT Data Collector environment. This constructor validates the API key, initializes the plugin environment, installs the exception handler, and sends a PING request or a PING_WITH_SETTINGS request to receive new remote settings.
context | The context of the application. |
apiKey | The API key you received for the project. |
|
static |
Use this constructor to initialize and start the session for the HTTP Event Collector (HEC) environment. This constructor validates the HEC token, initializes the plugin environment, installs the exception handler, and sends a PING request.
context | The context of the application. |
url | The URL of the HEC MINT endpoint. |
token | The token of the HEC input. |
|
static |
Leaves a breadcrumb at a point of interest in your code.
breadcrumb | The name of the breadcrumb. |
|
static |
Logs an event and uses the default log level Verbose
.
eventName | The name of the event. |
|
static |
Logs an event with a specific log level.
eventName | The name of the event. |
logLevel | The log level of the event. |
|
static |
Logs an event with a specific log level.
eventName | The name of the event. |
logLevel | The log level of the event. |
customData | The HashMap containing custom data. |
|
static |
Logs an event with a specific log level.
eventName | The name of the event. |
logLevel | The log level of the event. |
keyName | The key name for extra data. |
keyValue | The value of extra data. |
|
static |
Submits a handled exception (if inside a try-catch
block) and a map of custom data.
customData | The HashMap containing custom data. |
exception | The handled exception. |
|
static |
Submits a handled exception (if inside a try-catch
block) and a map of custom data.
ex | The handled exception. |
|
static |
Submits a handled exception (if inside a try-catch
block) and a custom key-value pair.
key | The key. |
value | The value. |
exception | The handled exception. |
|
static |
Logs a specific view as a Splunk data type.
view | The name of the view. |
|
static |
Logs a specific view as a Splunk data type.
view | The name of the view. |
key | Extra data key. |
value | Extra data value. |
|
static |
Logs a specific view as a Splunk data type.
extraData | Extra data. |
view | The name of the view. |
|
static |
Removes a specific key-value pair from the extra data.
key | The key to remove. |
|
static |
Sets the application environment. Use a custom string or one of the following suggested environments:
environment | The application environment. |
|
static |
Enables MINT to flush data only when there is a WiFi connection.
Note Be sure to add the ACCESS_NETWORK_STATE permission to your AndroidManifest.xml file.
enabled | true to enable sending date over WiFi only, false to disable it. |
|
static |
Restricts the number of lines in the LogCat output.
lines | The number of lines to report. |
|
static |
Sets a LogCat filter string.
filter | The filter expression. For more information, see [ Filtering Log Output](http://developer.android.com/tools/debugging/debugging -log.html#filteringOutput) on the Android Developers website. |
|
static |
Restricts the number of lines in the LogCat output and sets a LogCat filter string.
lines | The number of lines to report. |
filter | The filter expression. For more information, see [ Filtering Log Output](http://developer.android.com/tools/debugging/debugging -log.html#filteringOutput) on the Android Developers website. |
|
static |
|
static |
Sets the session interval time. This value should be more than 30 seconds and less than a day.
timeInSecs | The session interval time, in seconds. |
|
static |
Sets an identifier for the current user.
userIdentifier | The user identifier, such as a random ID, an email address, or a user name. |
|
static |
Indicates whether to prevent MINT from saving or sending any data for the user.
optedOut | true to enable user opt-out, false to disable it. |
|
static |
Starts a new session. This method checks the sent time of the last PING request and creates a new one if more than 60 seconds have passed.
context | The context of the application. |
|
static |
Cancels a transaction.
name | The name of the transaction. |
reason | The reason for canceling the transaction. This value can be null or empty. |
|
static |
Cancels a transaction.
name | The name of the transaction. |
reason | The reason for canceling the transaction. This value can be null or empty. |
customData | The HashMap containing custom data. |
|
static |
Cancels a transaction.
name | The name of the transaction. |
reason | The reason for canceling the transaction. This value can be null or empty. |
keyName | The key name for extra data. |
keyValue | The value of extra data. |
|
static |
Starts a transaction.
name | The name of the transaction. |
|
static |
Starts a transaction.
name | The name of the transaction. |
customData | The HashMap containing custom data. |
|
static |
Starts a transaction.
name | The name of the transaction. |
keyName | The key name for extra data. |
keyValue | The value of extra data. |
|
static |
Stops a transaction.
name | The name of the transaction. |
|
static |
Stops a transaction.
name | The name of the transaction. |
customData | The HashMap containing custom data. |
|
static |
Stops a transaction.
name | The name of the transaction. |
keyName | The key name for extra data. |
keyValue | The value of extra data. |
|
static |
Used to report exceptions from Xamarin.
exception | |
handled | |
customData |
|
static |
The header name to use for HTTP.
|
static |
The header name to use for HTTP.