Splunk MINT SDK for Android (Legacy)

Splunk MINT SDK for Android Developer Guide

Splunk MINT is no longer available for purchase as of January 29, 2021. Customers who have already been paying to ingest and process MINT data in Splunk Enterprise will continue to receive support until December 31, 2021, which is End of Life for all MINT products: App, Web Service (Management Console), SDK and Add-On.

Add and report events

Add and report events

In addition to reporting the sequence of events leading up to an app crash, Splunk MINT can report events that are not associated with a crash. For example, if your application asks users to make a selection, you can report the user's selection. You can also include the log level with the event: Verbose, Debug, Info, Warning, or Error. This extra data is included in all event actions except for pings and gnips.

  • To report an event, use the logEvent(eventName) method as follows:
  • Mint.logEvent("Button1 pressed");
    
  • To report an event with the log level, use the logEvent(eventName, logLevel) method as follows:
  • Mint.logEvent("Button1 pressed", MintLogLevel.Info);
    

Add as many events as you like to track virtually any user activity on your app. To view the event data, see the Events dashboard in Splunk MINT Management Console.

Add custom data to events

You can add extra custom data to specific events as a data map or as a key-value pair. Custom data can only be viewed using the Splunk MINT App.

  • To add custom data to a specific event as a data map, use the logEvent(eventName, logLevel, customData) method as follows:
  • HashMap<String, Object> mydata = new HashMap<String, Object>();
    mydata.put("hotel", "Bob's B&B");
    mydata.put("member", "Elite");
    Mint.logEvent("Button1 pressed", MintLogLevel.Info, mydata);
    
  • To add custom data to a specific event as a key-value pair, use the logEvent(eventName, logLevel, keyName, keyValue) method as follows:
  • Mint.logEvent("Button1 pressed", MintLogLevel.Info, "hotel", "Bob's B&B");
    

View custom data

To view custom data for events, open the Splunk MINT App and run a search. For example, the following search shows the events that contain custom data for "hotel":

index=mint event_name=* extraData.hotel=* | table event_name, extraData.hotel

For more about running searches in MINT, see Searches in the Splunk MINT App User Guide.

Last modified on 28 January, 2019
Monitor transactions   Report handled exceptions

This documentation applies to the following versions of Splunk MINT SDK for Android (Legacy): 5.2.x


Was this topic useful?







You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters