Skip to main content

Class: SilentTelemetryConnector

Class for performing telemetry operations to nowhere.

Implements

Constructors

Constructor

new SilentTelemetryConnector(): SilentTelemetryConnector

Returns

SilentTelemetryConnector

Properties

CLASS_NAME

readonly static CLASS_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

ITelemetryMetric

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

ITelemetryConnector.getMetric


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>

Update metric value.

Parameters

id

string

The id of the metric.

value

The value for the update operation.

number | "inc" | "dec"

customData?

The custom data for the update 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?

MetricType

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

ITelemetryConnector.query


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.

Implementation of

ITelemetryConnector.queryValues