site24x7_datalake_sdk
v1.0.0
Published
Used to push datalake metrics to our server
Readme
site24x7_datalake_sdk
There should be a configuration file named apminsightnode.json to hold the license key and other configurations.
Require or import custom metrics package.
- For TypeScript
import * as custom_metrics from 'site24x7_datalake_sdk'- For JavaScript
const customMetrics = require('site24x7_datalake_sdk')Use the createDateLake function and pass appKey as an argument
const dataLake = customMetrics.createDataLake("<appkey>");Using the above datalake to create datalake resource as below:
Note:tags are optional
const dataLakeResource1 = dataLake.createResource({ "resourcetag1": "restag1", "resourcetag2": "restag2" });Using the above datalake resource, count, gauge, rate, and histogram metrics can be called.
dataLakeResource1.count({ "name": <Name of the count metrics>, "value": <Value>, "unit": "one", (Optional, defaults to "one") "tags": { (Optional) "<String field 1>": "<Value>", "<String field 2>": "<Value>" } });
Similarly, the other APIs (accessed using the datalakeresouce object) are:
gauge, rate, histogramNote: As many DataLake resources as needed can be created.
