Class: MetricsService

MetricsService

Metrics service instance for invoking the Metrics services.

new MetricsService()

Should not be called by the developer.
Source:

Methods

clearFlowTag()

This method will clear the flow tag set by the user previously.
Source:

flushEvents()

This method will send the buffered events to the server at once.
Source:

getEventsInBuffer() → {object}

This method will return the a List of the buffered events.
Source:
Returns:
events - list of events stored in buffer.
Type
object

getFlowTag() → {string}

This method will return the a String to set a Flow Tag for the reported events.
Source:
Returns:
flowTag - flow tag set by the user for reporting the events.
Type
string

getSessionId()

get the current sessionID
Source:

getUserId()

invoke the getUserId operation
Source:

reportError(errorCode, errorType, errorMessage, errorDetails)

This method takes the event details from the developer and schedule it for sending to server as per Configuration values set by the developer.
Parameters:
Name Type Description
errorCode string errorCode of the reported error. Can be empty if not applicable
errorType string errorType of the reported error. Can be empty if not applicable
errorMessage string errorMessage of the reported error. Can be empty if not applicable
errorDetails json errorDetails of the reported error as a json string that can have key-value pairs for the following keys errfile, errmethod, errline, errstacktrace, formID, widgetID, flowTag.
Source:
Throws:
Exception

reportHandledException(exceptionCode, exceptionType, exceptionMessage, exceptionDetails)

This method takes the event details from the developer and schedule it for sending to server as per Configuration values set by the developer.
Parameters:
Name Type Description
exceptionCode string Code for the reported exception. Can be empty if not applicable
exceptionType string Type of the reported exception. Can be empty if not applicable
exceptionMessage string Message of the reported exception. Can be empty if not applicable
exceptionDetails json Details of the reported exception as a JSON string that can have key-value pairs for the following keys exceptioncode, exceptionfile, exceptionmethod, exceptionline, exceptionstacktrace, formID, widgetID, flowTag.
Source:
Throws:
Exception

sendCustomMetrics(reportingGroupID, metrics)

invoke the sendCustomMetrics operation
Parameters:
Name Type Description
reportingGroupID string reporting Group ID
metrics object metrics being reported
Source:

sendEvent(evttype, evtSubType, formID, widgetID, flowTag, metaData)

This method takes the event details from the developer and schedule it for sending to server as per Configuration values set by the developer.
Parameters:
Name Type Description
evttype string Event Type for the reported event.
evtSubType string string literal for eventSubType(max 256 Chars)
formID string string literal for formID(max 256 Chars)
widgetID string string literal for widgetID(max 256 Chars)
flowTag string string literal to override flow tag (max 256 Chars)
metaData string string to describe metaData
Source:
Throws:
Exception

setEventConfig(confType, eventBufferAutoFlushCount, eventBufferMaxCount)

This method will take the required values to set the event Configuration values.
Parameters:
Name Type Description
confType string sets the Current Configuration Type possible values BUFFER or INSTANT.
eventBufferAutoFlushCount number event buffer count to auto flush the events possible values any positive integer Default value 15
eventBufferMaxCount number Maximum event buffer count to store the events possible values any positive integer Default value 1000
Source:

setEventTracking()

stub method used for event tracking
Source:

setFlowTag(flowTag)

This method will take the a String to set a Flow Tag for the reported events.
Parameters:
Name Type Description
flowTag string sets flow tag for reporting the events.
Source:

setSessionId(sessionId)

sets the current sessionId
Parameters:
Name Type Description
sessionId string
Source: