Class: SilentTelemetryConnector
Class for performing telemetry operations to nowhere.
Implements
Constructors
Constructor
new SilentTelemetryConnector():
SilentTelemetryConnector
Returns
SilentTelemetryConnector
Properties
CLASS_NAME
readonly
CLASS_NAME:string
Runtime name for the class.
Implementation of
ITelemetryConnector.CLASS_NAME
Methods
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
>
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?
,pageSize?
):Promise
<{entities
:ITelemetryMetric
[];cursor?
:string
; }>
Query the metrics.
Parameters
type?
The type of the metric.
cursor?
string
The cursor to request the next page of entities.
pageSize?
number
The maximum number of entities in a page.
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?
,pageSize?
):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 page of entities.
pageSize?
number
The maximum number of entities in a page.
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.