Implementing Custom Metrics in Volt MX Iris
Implementing Custom Metrics in Volt MX Iris
To implement custom metrics in Volt MX Iris, send data from your application to the custom metrics in Volt MX Cloud. You can also send custom metrics by calling a new API in Volt MX Iris, HCLMetricsService.sendCustomMetrics (<form_name>,<json string>)
.
This API will initiate a service callback to Volt MX Server in a development cloud with service ID as capturevoltmxcustommetrics.
To define metrics in Volt MX Iris, follow these steps:
- In Volt MX Iris, design a form for an application.
- To implement the metrics for an application in Volt MX Iris, choose one of the following methods:
- Right-click on a form element. Define the metrics using
HCLMetricsService.sendCustomMetrics
in an onClick event by adding a code snippet to the Action Sequence. - Configure the metrics in a code module.
- Right-click on a form element. Define the metrics using
-
Define the metrics.
-
The supported formats for key values are as follows:
Each JSON object in the following formats correspond to one set of associated data./ JSON Array with single JSON object with multiple keys: / / The following format is used for sending a single set of associated data. For example, you can check the value of met2 when the value of met1 is metVal1. /
[ { "met1": "metVal1", "met2": "metVal2" } ]
/ JSON array with multiple JSON objects: / / The following format is used for sending or collecting multiple sets of associated data / [ { "met1": "metVal1", "met2": "metVal2" }, { "met1": "metVal3", "met2": "metVal4" } ]
}
The following example shows a custom metrics code defined for an element in Volt MX Iris.
For more information about metrics APIs, refer to SDK documentation.
-
-
After you define the Custom Metrics in Volt MX Iris, rebuild and publish the application to the same cloud for which the custom metrics was defined.
- After the application is published and the appropriate trigger point is hit (button click or form load wherever the earlier API is called), metrics will be sent to cloud and stored for reporting purposes.
Note: After the data is sent from an application, it takes about 15-20 minutes for the data to reflect on cloud reports.