Class: MultiTelemetryConnector
Class for performing telemetry operations on multiple connectors.
Implements
Constructors
Constructor
new MultiTelemetryConnector(
options):MultiTelemetryConnector
Create a new instance of MultiTelemetryConnector.
Parameters
options
IMultiTelemetryConnectorConstructorOptions
The options for the connector.
Returns
MultiTelemetryConnector
Properties
CLASS_NAME
readonlystaticCLASS_NAME:string
Runtime name for the class.
Methods
className()
className():
string
Returns the class name of the component.
Returns
string
The class name of the component.
Implementation of
ITelemetryConnector.className
createMetric()
createMetric(
metric):Promise<void>
Create a new metric.
Parameters
metric
The metric details.
Returns
Promise<void>
Nothing.
Implementation of
ITelemetryConnector.createMetric
getMetric()
getMetric(
id):Promise<{metric:ITelemetryMetric;value:ITelemetryMetricValue; }>
Get the metric details and it's most recent value.
Parameters
id
string
The metric id.
Returns
Promise<{ metric: ITelemetryMetric; value: ITelemetryMetricValue; }>
The metric details and it's most recent value.
Implementation of
updateMetric()
updateMetric(
metric):Promise<void>
Update metric.
Parameters
metric
Omit<ITelemetryMetric, "type">
The metric details.
Returns
Promise<void>
Nothing.
Implementation of
ITelemetryConnector.updateMetric
addMetricValue()
addMetricValue(
id,value,customData?):Promise<string>
Add a metric value.
Parameters
id
string
The id of the metric.
value
The value for the add operation.
number | "inc" | "dec"
customData?
The custom data for the add operation.
Returns
Promise<string>
The created metric value id.
Implementation of
ITelemetryConnector.addMetricValue
removeMetric()
removeMetric(
id):Promise<void>
Remove metric.
Parameters
id
string
The id of the metric.
Returns
Promise<void>
Nothing.
Implementation of
ITelemetryConnector.removeMetric
query()
query(
type?,cursor?,limit?):Promise<{entities:ITelemetryMetric[];cursor?:string; }>
Query the metrics.
Parameters
type?
The type of the metric.
cursor?
string
The cursor to request the next chunk of entities.
limit?
number
Limit the number of entities to return.
Returns
Promise<{ entities: ITelemetryMetric[]; cursor?: string; }>
All the entities for the storage matching the conditions, and a cursor which can be used to request more entities.
Throws
NotImplementedError if the implementation does not support retrieval.
Implementation of
queryValues()
queryValues(
id,timeStart?,timeEnd?,cursor?,limit?):Promise<{metric:ITelemetryMetric;entities:ITelemetryMetricValue[];cursor?:string; }>
Query the metric values.
Parameters
id
string
The id of the metric.
timeStart?
number
The inclusive time as the start of the metric entries.
timeEnd?
number
The inclusive time as the end of the metric entries.
cursor?
string
The cursor to request the next chunk of entities.
limit?
number
Limit the number of entities to return.
Returns
Promise<{ metric: ITelemetryMetric; entities: ITelemetryMetricValue[]; cursor?: string; }>
All the entities for the storage matching the conditions, and a cursor which can be used to request more entities.
Throws
NotImplementedError if the implementation does not support retrieval.