Module: Analytics API

Methods

(async, static) sendCustomLogs(customLogInputs) → {Promise}

Sends custom log events to the Mobile Foundation Analytics Service. Logs can be viewed and charted using the Mobile Foundation Analytics Console
Parameters:
Name Type Description
customLogInputs object A JSON object containing log information.
Returns:
Returns the HTTP status code on success and the response from the Analytics server on error
Type
Promise
Example
{
    "serverIpAddress": "9.1.2.34",
    "customDataMap": {
        "Test": "Test logs"
    },
    "timestamp": "2020-05-03T05:12:53.432Z",
    "timezone": "60",
    "appVersion": "2.0 Beta",
    "appName": "IBM Acme App",
    "appID": "com.ibm.acme",
    "appVersionCode": "2",
    "deviceID": "518c66913ec337f0",
    "deviceModel": "iPhone6,2",
    "deviceBrand": "Apple",
    "deviceOS": "iOS",
    "deviceOSversion": "9.2.1"
  };
  

(async, static) sendNetworkTransactions(networkLogInputs) → {Promise}

Send network data to the Mobile Foundation Analytics service.
Parameters:
Name Type Description
networkLogInputs object A JSON object containing the network transaction data. See example below
Returns:
Returns the HTTP status code on success and the response from the Analytics server on error
Type
Promise
Example
networkLogInputs = {
    "resourceURL": "http://9.8.7.6:9080/some/path",
    "responseCode": "200",
    "requestMethod": "GET",
    "loginModuleName": "My Login Module",
    "realmName": "userCredChallengerRealm",
    "sessionID": "jfkld789087f908s",
    "trackingID": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
    "serverIpAddress": "172.16.254.1",
    "bytesReceived": "2300",
    "bytesSent": "120",
    "serverProcessingTime": "289",
    "backendProcessingTime": "95",
    "adapterName": "MyAdapter",
    "procedureName": "MyProcedure",
    "authenticator": "com.ibm.acme.MyAuthenticator",
    "loginModule": "com.ibm.acme.MyLoginModule",
    "authSuccess": false,
    "validationCode": "TOKEN_FAILED_MISSING_PARAMETER",
    "roundTripTime": "598",
    "inboundTimestamp": "2020-05-03T05:12:53.459Z",
    "outboundTimestamp": "2020-05-03T05:12:53.459Z",
    "userAgent": "Mozilla/5.0 (Linux; U; Android 4.0.3; ...",
    "appVersion": "2.0 Beta",
    "appName": "IBM Acme App",
    "appID": "com.ibm.acme",
    "appVersionCode": "2",
    "deviceID": "518c66913ec337f0",
    "deviceModel": "iPhone6,2",
    "deviceBrand": "Apple",
    "deviceOS": "iOS",
    "deviceOSversion": "9.2.1",
    "timestamp": "2020-05-03T05:12:53.459Z",
    "timezone": "60"
    };