@3sixty/telemetry-models 0.0.0-stage → 0.20.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +24 -2
- package/dist/es/connectors/multiTelemetryConnector.js +184 -0
- package/dist/es/connectors/multiTelemetryConnector.js.map +1 -0
- package/dist/es/connectors/silentTelemetryConnector.js +57 -0
- package/dist/es/connectors/silentTelemetryConnector.js.map +1 -0
- package/dist/es/factories/metricsProducerFactory.js +13 -0
- package/dist/es/factories/metricsProducerFactory.js.map +1 -0
- package/dist/es/factories/telemetryConnectorFactory.js +9 -0
- package/dist/es/factories/telemetryConnectorFactory.js.map +1 -0
- package/dist/es/helpers/metricHelper.js +139 -0
- package/dist/es/helpers/metricHelper.js.map +1 -0
- package/dist/es/index.js +30 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IMetricsCollectorComponent.js +2 -0
- package/dist/es/models/IMetricsCollectorComponent.js.map +1 -0
- package/dist/es/models/IMetricsProducer.js +2 -0
- package/dist/es/models/IMetricsProducer.js.map +1 -0
- package/dist/es/models/IMultiTelemetryConnectorConstructorOptions.js +4 -0
- package/dist/es/models/IMultiTelemetryConnectorConstructorOptions.js.map +1 -0
- package/dist/es/models/ITelemetryComponent.js +2 -0
- package/dist/es/models/ITelemetryComponent.js.map +1 -0
- package/dist/es/models/ITelemetryConnector.js +2 -0
- package/dist/es/models/ITelemetryConnector.js.map +1 -0
- package/dist/es/models/ITelemetryMetric.js +2 -0
- package/dist/es/models/ITelemetryMetric.js.map +1 -0
- package/dist/es/models/ITelemetryMetricValue.js +4 -0
- package/dist/es/models/ITelemetryMetricValue.js.map +1 -0
- package/dist/es/models/ITelemetryMetricValueEntry.js +2 -0
- package/dist/es/models/ITelemetryMetricValueEntry.js.map +1 -0
- package/dist/es/models/api/ITelemetryAddMetricValueRequest.js +2 -0
- package/dist/es/models/api/ITelemetryAddMetricValueRequest.js.map +1 -0
- package/dist/es/models/api/ITelemetryCreateMetricRequest.js +2 -0
- package/dist/es/models/api/ITelemetryCreateMetricRequest.js.map +1 -0
- package/dist/es/models/api/ITelemetryGetMetricRequest.js +4 -0
- package/dist/es/models/api/ITelemetryGetMetricRequest.js.map +1 -0
- package/dist/es/models/api/ITelemetryGetMetricResponse.js +2 -0
- package/dist/es/models/api/ITelemetryGetMetricResponse.js.map +1 -0
- package/dist/es/models/api/ITelemetryGetMetricValueRequest.js +4 -0
- package/dist/es/models/api/ITelemetryGetMetricValueRequest.js.map +1 -0
- package/dist/es/models/api/ITelemetryGetMetricValueResponse.js +2 -0
- package/dist/es/models/api/ITelemetryGetMetricValueResponse.js.map +1 -0
- package/dist/es/models/api/ITelemetryListRequest.js +4 -0
- package/dist/es/models/api/ITelemetryListRequest.js.map +1 -0
- package/dist/es/models/api/ITelemetryListResponse.js +2 -0
- package/dist/es/models/api/ITelemetryListResponse.js.map +1 -0
- package/dist/es/models/api/ITelemetryRemoveMetricRequest.js +4 -0
- package/dist/es/models/api/ITelemetryRemoveMetricRequest.js.map +1 -0
- package/dist/es/models/api/ITelemetryUpdateMetricRequest.js +4 -0
- package/dist/es/models/api/ITelemetryUpdateMetricRequest.js.map +1 -0
- package/dist/es/models/api/ITelemetryValuesListRequest.js +4 -0
- package/dist/es/models/api/ITelemetryValuesListRequest.js.map +1 -0
- package/dist/es/models/api/ITelemetryValuesListResponse.js +2 -0
- package/dist/es/models/api/ITelemetryValuesListResponse.js.map +1 -0
- package/dist/es/models/metricCounterOperation.js +17 -0
- package/dist/es/models/metricCounterOperation.js.map +1 -0
- package/dist/es/models/metricType.js +21 -0
- package/dist/es/models/metricType.js.map +1 -0
- package/dist/types/connectors/multiTelemetryConnector.d.ts +124 -0
- package/dist/types/connectors/silentTelemetryConnector.d.ts +56 -0
- package/dist/types/factories/metricsProducerFactory.d.ts +10 -0
- package/dist/types/factories/telemetryConnectorFactory.d.ts +6 -0
- package/dist/types/helpers/metricHelper.d.ts +67 -0
- package/dist/types/index.d.ts +27 -0
- package/dist/types/models/IMetricsCollectorComponent.d.ts +6 -0
- package/dist/types/models/IMetricsProducer.d.ts +27 -0
- package/dist/types/models/IMultiTelemetryConnectorConstructorOptions.d.ts +9 -0
- package/dist/types/models/ITelemetryComponent.d.ts +109 -0
- package/dist/types/models/ITelemetryConnector.d.ts +109 -0
- package/dist/types/models/ITelemetryMetric.d.ts +31 -0
- package/dist/types/models/ITelemetryMetricValue.d.ts +23 -0
- package/dist/types/models/ITelemetryMetricValueEntry.d.ts +20 -0
- package/dist/types/models/api/ITelemetryAddMetricValueRequest.d.ts +30 -0
- package/dist/types/models/api/ITelemetryCreateMetricRequest.d.ts +11 -0
- package/dist/types/models/api/ITelemetryGetMetricRequest.d.ts +14 -0
- package/dist/types/models/api/ITelemetryGetMetricResponse.d.ts +20 -0
- package/dist/types/models/api/ITelemetryGetMetricValueRequest.d.ts +18 -0
- package/dist/types/models/api/ITelemetryGetMetricValueResponse.d.ts +10 -0
- package/dist/types/models/api/ITelemetryListRequest.d.ts +22 -0
- package/dist/types/models/api/ITelemetryListResponse.d.ts +19 -0
- package/dist/types/models/api/ITelemetryRemoveMetricRequest.d.ts +14 -0
- package/dist/types/models/api/ITelemetryUpdateMetricRequest.d.ts +31 -0
- package/dist/types/models/api/ITelemetryValuesListRequest.d.ts +35 -0
- package/dist/types/models/api/ITelemetryValuesListResponse.d.ts +24 -0
- package/dist/types/models/metricCounterOperation.d.ts +17 -0
- package/dist/types/models/metricType.d.ts +21 -0
- package/docs/changelog.md +0 -0
- package/docs/examples.md +142 -0
- package/docs/reference/classes/MetricHelper.md +226 -0
- package/docs/reference/classes/MultiTelemetryConnector.md +357 -0
- package/docs/reference/classes/SilentTelemetryConnector.md +191 -0
- package/docs/reference/index.md +42 -0
- package/docs/reference/interfaces/IMetricsCollectorComponent.md +7 -0
- package/docs/reference/interfaces/IMetricsProducer.md +45 -0
- package/docs/reference/interfaces/IMultiTelemetryConnectorConstructorOptions.md +11 -0
- package/docs/reference/interfaces/ITelemetryAddMetricValueRequest.md +41 -0
- package/docs/reference/interfaces/ITelemetryComponent.md +271 -0
- package/docs/reference/interfaces/ITelemetryConnector.md +271 -0
- package/docs/reference/interfaces/ITelemetryCreateMetricRequest.md +12 -0
- package/docs/reference/interfaces/ITelemetryGetMetricRequest.md +17 -0
- package/docs/reference/interfaces/ITelemetryGetMetricResponse.md +23 -0
- package/docs/reference/interfaces/ITelemetryGetMetricValueRequest.md +23 -0
- package/docs/reference/interfaces/ITelemetryGetMetricValueResponse.md +11 -0
- package/docs/reference/interfaces/ITelemetryListRequest.md +29 -0
- package/docs/reference/interfaces/ITelemetryListResponse.md +23 -0
- package/docs/reference/interfaces/ITelemetryMetric.md +52 -0
- package/docs/reference/interfaces/ITelemetryMetricValue.md +39 -0
- package/docs/reference/interfaces/ITelemetryMetricValueEntry.md +31 -0
- package/docs/reference/interfaces/ITelemetryRemoveMetricRequest.md +17 -0
- package/docs/reference/interfaces/ITelemetryUpdateMetricRequest.md +43 -0
- package/docs/reference/interfaces/ITelemetryValuesListRequest.md +49 -0
- package/docs/reference/interfaces/ITelemetryValuesListResponse.md +29 -0
- package/docs/reference/type-aliases/MetricCounterOperation.md +5 -0
- package/docs/reference/type-aliases/MetricType.md +5 -0
- package/docs/reference/variables/MetricCounterOperation.md +19 -0
- package/docs/reference/variables/MetricType.md +25 -0
- package/docs/reference/variables/MetricsProducerFactory.md +9 -0
- package/docs/reference/variables/TelemetryConnectorFactory.md +5 -0
- package/locales/en.json +7 -0
- package/package.json +51 -5
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# Interface: ITelemetryComponent
|
|
2
|
+
|
|
3
|
+
Interface describing a telemetry component contract.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- `IComponent`
|
|
8
|
+
|
|
9
|
+
## Methods
|
|
10
|
+
|
|
11
|
+
### createMetric() {#createmetric}
|
|
12
|
+
|
|
13
|
+
> **createMetric**(`metric`): `Promise`\<`void`\>
|
|
14
|
+
|
|
15
|
+
Create one or more metrics.
|
|
16
|
+
A single metric fails if it already exists; an array declares the set that should exist,
|
|
17
|
+
creating the ones that are missing and leaving the rest untouched, so implementations
|
|
18
|
+
which persist the definitions can resolve the whole set in one operation.
|
|
19
|
+
|
|
20
|
+
#### Parameters
|
|
21
|
+
|
|
22
|
+
##### metric
|
|
23
|
+
|
|
24
|
+
[`ITelemetryMetric`](ITelemetryMetric.md) \| [`ITelemetryMetric`](ITelemetryMetric.md)[]
|
|
25
|
+
|
|
26
|
+
The metric details, or the details of several metrics.
|
|
27
|
+
|
|
28
|
+
#### Returns
|
|
29
|
+
|
|
30
|
+
`Promise`\<`void`\>
|
|
31
|
+
|
|
32
|
+
A promise that resolves when the metrics have been created.
|
|
33
|
+
|
|
34
|
+
***
|
|
35
|
+
|
|
36
|
+
### getMetric() {#getmetric}
|
|
37
|
+
|
|
38
|
+
> **getMetric**(`id`): `Promise`\<\{ `metric`: [`ITelemetryMetric`](ITelemetryMetric.md); `value?`: [`ITelemetryMetricValue`](ITelemetryMetricValue.md); \}\>
|
|
39
|
+
|
|
40
|
+
Get the metric details and it's most recent value.
|
|
41
|
+
|
|
42
|
+
#### Parameters
|
|
43
|
+
|
|
44
|
+
##### id
|
|
45
|
+
|
|
46
|
+
`string`
|
|
47
|
+
|
|
48
|
+
The metric id.
|
|
49
|
+
|
|
50
|
+
#### Returns
|
|
51
|
+
|
|
52
|
+
`Promise`\<\{ `metric`: [`ITelemetryMetric`](ITelemetryMetric.md); `value?`: [`ITelemetryMetricValue`](ITelemetryMetricValue.md); \}\>
|
|
53
|
+
|
|
54
|
+
The metric details and it's most recent value.
|
|
55
|
+
|
|
56
|
+
***
|
|
57
|
+
|
|
58
|
+
### getMetricValue() {#getmetricvalue}
|
|
59
|
+
|
|
60
|
+
> **getMetricValue**(`id`, `valueId`): `Promise`\<[`ITelemetryMetricValue`](ITelemetryMetricValue.md)\>
|
|
61
|
+
|
|
62
|
+
Get a specific metric value by its id.
|
|
63
|
+
|
|
64
|
+
#### Parameters
|
|
65
|
+
|
|
66
|
+
##### id
|
|
67
|
+
|
|
68
|
+
`string`
|
|
69
|
+
|
|
70
|
+
The id of the metric.
|
|
71
|
+
|
|
72
|
+
##### valueId
|
|
73
|
+
|
|
74
|
+
`string`
|
|
75
|
+
|
|
76
|
+
The id of the metric value.
|
|
77
|
+
|
|
78
|
+
#### Returns
|
|
79
|
+
|
|
80
|
+
`Promise`\<[`ITelemetryMetricValue`](ITelemetryMetricValue.md)\>
|
|
81
|
+
|
|
82
|
+
The metric value.
|
|
83
|
+
|
|
84
|
+
***
|
|
85
|
+
|
|
86
|
+
### updateMetric() {#updatemetric}
|
|
87
|
+
|
|
88
|
+
> **updateMetric**(`metric`): `Promise`\<`void`\>
|
|
89
|
+
|
|
90
|
+
Update metric.
|
|
91
|
+
|
|
92
|
+
#### Parameters
|
|
93
|
+
|
|
94
|
+
##### metric
|
|
95
|
+
|
|
96
|
+
`Omit`\<[`ITelemetryMetric`](ITelemetryMetric.md), `"type"`\>
|
|
97
|
+
|
|
98
|
+
The metric details.
|
|
99
|
+
|
|
100
|
+
#### Returns
|
|
101
|
+
|
|
102
|
+
`Promise`\<`void`\>
|
|
103
|
+
|
|
104
|
+
A promise that resolves when the metric has been updated.
|
|
105
|
+
|
|
106
|
+
***
|
|
107
|
+
|
|
108
|
+
### addMetricValue() {#addmetricvalue}
|
|
109
|
+
|
|
110
|
+
> **addMetricValue**(`id`, `value`, `customData?`): `Promise`\<`string`\>
|
|
111
|
+
|
|
112
|
+
Add a metric value.
|
|
113
|
+
|
|
114
|
+
#### Parameters
|
|
115
|
+
|
|
116
|
+
##### id
|
|
117
|
+
|
|
118
|
+
`string`
|
|
119
|
+
|
|
120
|
+
The id of the metric.
|
|
121
|
+
|
|
122
|
+
##### value
|
|
123
|
+
|
|
124
|
+
`number` \| [`MetricCounterOperation`](../type-aliases/MetricCounterOperation.md)
|
|
125
|
+
|
|
126
|
+
The value for the add operation.
|
|
127
|
+
|
|
128
|
+
##### customData?
|
|
129
|
+
|
|
130
|
+
The custom data for the add operation.
|
|
131
|
+
|
|
132
|
+
#### Returns
|
|
133
|
+
|
|
134
|
+
`Promise`\<`string`\>
|
|
135
|
+
|
|
136
|
+
The created metric value id.
|
|
137
|
+
|
|
138
|
+
***
|
|
139
|
+
|
|
140
|
+
### addMetricValues() {#addmetricvalues}
|
|
141
|
+
|
|
142
|
+
> **addMetricValues**(`values`): `Promise`\<`string`[]\>
|
|
143
|
+
|
|
144
|
+
Add multiple metric values, so implementations which persist them can do so in one
|
|
145
|
+
operation instead of one per value.
|
|
146
|
+
|
|
147
|
+
#### Parameters
|
|
148
|
+
|
|
149
|
+
##### values
|
|
150
|
+
|
|
151
|
+
[`ITelemetryMetricValueEntry`](ITelemetryMetricValueEntry.md)[]
|
|
152
|
+
|
|
153
|
+
The metric values to add.
|
|
154
|
+
|
|
155
|
+
#### Returns
|
|
156
|
+
|
|
157
|
+
`Promise`\<`string`[]\>
|
|
158
|
+
|
|
159
|
+
The created metric value ids, in the order the values were supplied.
|
|
160
|
+
|
|
161
|
+
***
|
|
162
|
+
|
|
163
|
+
### removeMetric() {#removemetric}
|
|
164
|
+
|
|
165
|
+
> **removeMetric**(`id`): `Promise`\<`void`\>
|
|
166
|
+
|
|
167
|
+
Remove metric.
|
|
168
|
+
|
|
169
|
+
#### Parameters
|
|
170
|
+
|
|
171
|
+
##### id
|
|
172
|
+
|
|
173
|
+
`string`
|
|
174
|
+
|
|
175
|
+
The id of the metric.
|
|
176
|
+
|
|
177
|
+
#### Returns
|
|
178
|
+
|
|
179
|
+
`Promise`\<`void`\>
|
|
180
|
+
|
|
181
|
+
A promise that resolves when the metric and all its values have been removed.
|
|
182
|
+
|
|
183
|
+
***
|
|
184
|
+
|
|
185
|
+
### query() {#query}
|
|
186
|
+
|
|
187
|
+
> **query**(`type?`, `cursor?`, `limit?`): `Promise`\<\{ `entities`: [`ITelemetryMetric`](ITelemetryMetric.md)[]; `cursor?`: `string`; \}\>
|
|
188
|
+
|
|
189
|
+
Query the metrics.
|
|
190
|
+
|
|
191
|
+
#### Parameters
|
|
192
|
+
|
|
193
|
+
##### type?
|
|
194
|
+
|
|
195
|
+
[`MetricType`](../type-aliases/MetricType.md)
|
|
196
|
+
|
|
197
|
+
The type of the metric.
|
|
198
|
+
|
|
199
|
+
##### cursor?
|
|
200
|
+
|
|
201
|
+
`string`
|
|
202
|
+
|
|
203
|
+
The cursor to request the next chunk of entities.
|
|
204
|
+
|
|
205
|
+
##### limit?
|
|
206
|
+
|
|
207
|
+
`number`
|
|
208
|
+
|
|
209
|
+
Limit the number of entities to return.
|
|
210
|
+
|
|
211
|
+
#### Returns
|
|
212
|
+
|
|
213
|
+
`Promise`\<\{ `entities`: [`ITelemetryMetric`](ITelemetryMetric.md)[]; `cursor?`: `string`; \}\>
|
|
214
|
+
|
|
215
|
+
All the entities for the storage matching the conditions,
|
|
216
|
+
and a cursor which can be used to request more entities.
|
|
217
|
+
|
|
218
|
+
#### Throws
|
|
219
|
+
|
|
220
|
+
NotImplementedError if the implementation does not support retrieval.
|
|
221
|
+
|
|
222
|
+
***
|
|
223
|
+
|
|
224
|
+
### queryValues() {#queryvalues}
|
|
225
|
+
|
|
226
|
+
> **queryValues**(`id`, `timeStart?`, `timeEnd?`, `cursor?`, `limit?`): `Promise`\<\{ `metric`: [`ITelemetryMetric`](ITelemetryMetric.md); `entities`: [`ITelemetryMetricValue`](ITelemetryMetricValue.md)[]; `cursor?`: `string`; \}\>
|
|
227
|
+
|
|
228
|
+
Query the metric values.
|
|
229
|
+
|
|
230
|
+
#### Parameters
|
|
231
|
+
|
|
232
|
+
##### id
|
|
233
|
+
|
|
234
|
+
`string`
|
|
235
|
+
|
|
236
|
+
The id of the metric.
|
|
237
|
+
|
|
238
|
+
##### timeStart?
|
|
239
|
+
|
|
240
|
+
`number`
|
|
241
|
+
|
|
242
|
+
The inclusive time as the start of the metric entries.
|
|
243
|
+
|
|
244
|
+
##### timeEnd?
|
|
245
|
+
|
|
246
|
+
`number`
|
|
247
|
+
|
|
248
|
+
The inclusive time as the end of the metric entries.
|
|
249
|
+
|
|
250
|
+
##### cursor?
|
|
251
|
+
|
|
252
|
+
`string`
|
|
253
|
+
|
|
254
|
+
The cursor to request the next chunk of entities.
|
|
255
|
+
|
|
256
|
+
##### limit?
|
|
257
|
+
|
|
258
|
+
`number`
|
|
259
|
+
|
|
260
|
+
Limit the number of entities to return.
|
|
261
|
+
|
|
262
|
+
#### Returns
|
|
263
|
+
|
|
264
|
+
`Promise`\<\{ `metric`: [`ITelemetryMetric`](ITelemetryMetric.md); `entities`: [`ITelemetryMetricValue`](ITelemetryMetricValue.md)[]; `cursor?`: `string`; \}\>
|
|
265
|
+
|
|
266
|
+
All the entities for the storage matching the conditions,
|
|
267
|
+
and a cursor which can be used to request more entities.
|
|
268
|
+
|
|
269
|
+
#### Throws
|
|
270
|
+
|
|
271
|
+
NotImplementedError if the implementation does not support retrieval.
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# Interface: ITelemetryConnector
|
|
2
|
+
|
|
3
|
+
Interface describing a telemetry connector.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- `IComponent`
|
|
8
|
+
|
|
9
|
+
## Methods
|
|
10
|
+
|
|
11
|
+
### createMetric() {#createmetric}
|
|
12
|
+
|
|
13
|
+
> **createMetric**(`metric`): `Promise`\<`void`\>
|
|
14
|
+
|
|
15
|
+
Create one or more metrics.
|
|
16
|
+
A single metric fails if it already exists; an array declares the set that should exist,
|
|
17
|
+
creating the ones that are missing and leaving the rest untouched, so implementations
|
|
18
|
+
which persist the definitions can resolve the whole set in one operation.
|
|
19
|
+
|
|
20
|
+
#### Parameters
|
|
21
|
+
|
|
22
|
+
##### metric
|
|
23
|
+
|
|
24
|
+
[`ITelemetryMetric`](ITelemetryMetric.md) \| [`ITelemetryMetric`](ITelemetryMetric.md)[]
|
|
25
|
+
|
|
26
|
+
The metric details, or the details of several metrics.
|
|
27
|
+
|
|
28
|
+
#### Returns
|
|
29
|
+
|
|
30
|
+
`Promise`\<`void`\>
|
|
31
|
+
|
|
32
|
+
A promise that resolves when the metrics have been created.
|
|
33
|
+
|
|
34
|
+
***
|
|
35
|
+
|
|
36
|
+
### getMetric()? {#getmetric}
|
|
37
|
+
|
|
38
|
+
> `optional` **getMetric**(`id`): `Promise`\<\{ `metric`: [`ITelemetryMetric`](ITelemetryMetric.md); `value?`: [`ITelemetryMetricValue`](ITelemetryMetricValue.md); \}\>
|
|
39
|
+
|
|
40
|
+
Get the metric details and it's most recent value.
|
|
41
|
+
|
|
42
|
+
#### Parameters
|
|
43
|
+
|
|
44
|
+
##### id
|
|
45
|
+
|
|
46
|
+
`string`
|
|
47
|
+
|
|
48
|
+
The metric id.
|
|
49
|
+
|
|
50
|
+
#### Returns
|
|
51
|
+
|
|
52
|
+
`Promise`\<\{ `metric`: [`ITelemetryMetric`](ITelemetryMetric.md); `value?`: [`ITelemetryMetricValue`](ITelemetryMetricValue.md); \}\>
|
|
53
|
+
|
|
54
|
+
The metric details and it's most recent value.
|
|
55
|
+
|
|
56
|
+
***
|
|
57
|
+
|
|
58
|
+
### getMetricValue()? {#getmetricvalue}
|
|
59
|
+
|
|
60
|
+
> `optional` **getMetricValue**(`id`, `valueId`): `Promise`\<[`ITelemetryMetricValue`](ITelemetryMetricValue.md)\>
|
|
61
|
+
|
|
62
|
+
Get a specific metric value by its id.
|
|
63
|
+
|
|
64
|
+
#### Parameters
|
|
65
|
+
|
|
66
|
+
##### id
|
|
67
|
+
|
|
68
|
+
`string`
|
|
69
|
+
|
|
70
|
+
The id of the metric.
|
|
71
|
+
|
|
72
|
+
##### valueId
|
|
73
|
+
|
|
74
|
+
`string`
|
|
75
|
+
|
|
76
|
+
The id of the metric value.
|
|
77
|
+
|
|
78
|
+
#### Returns
|
|
79
|
+
|
|
80
|
+
`Promise`\<[`ITelemetryMetricValue`](ITelemetryMetricValue.md)\>
|
|
81
|
+
|
|
82
|
+
The metric value.
|
|
83
|
+
|
|
84
|
+
***
|
|
85
|
+
|
|
86
|
+
### updateMetric() {#updatemetric}
|
|
87
|
+
|
|
88
|
+
> **updateMetric**(`metric`): `Promise`\<`void`\>
|
|
89
|
+
|
|
90
|
+
Update metric.
|
|
91
|
+
|
|
92
|
+
#### Parameters
|
|
93
|
+
|
|
94
|
+
##### metric
|
|
95
|
+
|
|
96
|
+
`Omit`\<[`ITelemetryMetric`](ITelemetryMetric.md), `"type"`\>
|
|
97
|
+
|
|
98
|
+
The metric details.
|
|
99
|
+
|
|
100
|
+
#### Returns
|
|
101
|
+
|
|
102
|
+
`Promise`\<`void`\>
|
|
103
|
+
|
|
104
|
+
A promise that resolves when the metric has been updated.
|
|
105
|
+
|
|
106
|
+
***
|
|
107
|
+
|
|
108
|
+
### addMetricValue() {#addmetricvalue}
|
|
109
|
+
|
|
110
|
+
> **addMetricValue**(`id`, `value`, `customData?`): `Promise`\<`string`\>
|
|
111
|
+
|
|
112
|
+
Update metric value.
|
|
113
|
+
|
|
114
|
+
#### Parameters
|
|
115
|
+
|
|
116
|
+
##### id
|
|
117
|
+
|
|
118
|
+
`string`
|
|
119
|
+
|
|
120
|
+
The id of the metric.
|
|
121
|
+
|
|
122
|
+
##### value
|
|
123
|
+
|
|
124
|
+
`number` \| [`MetricCounterOperation`](../type-aliases/MetricCounterOperation.md)
|
|
125
|
+
|
|
126
|
+
The value for the update operation.
|
|
127
|
+
|
|
128
|
+
##### customData?
|
|
129
|
+
|
|
130
|
+
The custom data for the update operation.
|
|
131
|
+
|
|
132
|
+
#### Returns
|
|
133
|
+
|
|
134
|
+
`Promise`\<`string`\>
|
|
135
|
+
|
|
136
|
+
The created metric value id.
|
|
137
|
+
|
|
138
|
+
***
|
|
139
|
+
|
|
140
|
+
### addMetricValues() {#addmetricvalues}
|
|
141
|
+
|
|
142
|
+
> **addMetricValues**(`values`): `Promise`\<`string`[]\>
|
|
143
|
+
|
|
144
|
+
Add multiple metric values, so implementations which persist them can do so in one
|
|
145
|
+
operation instead of one per value.
|
|
146
|
+
|
|
147
|
+
#### Parameters
|
|
148
|
+
|
|
149
|
+
##### values
|
|
150
|
+
|
|
151
|
+
[`ITelemetryMetricValueEntry`](ITelemetryMetricValueEntry.md)[]
|
|
152
|
+
|
|
153
|
+
The metric values to add.
|
|
154
|
+
|
|
155
|
+
#### Returns
|
|
156
|
+
|
|
157
|
+
`Promise`\<`string`[]\>
|
|
158
|
+
|
|
159
|
+
The created metric value ids, in the order the values were supplied.
|
|
160
|
+
|
|
161
|
+
***
|
|
162
|
+
|
|
163
|
+
### removeMetric() {#removemetric}
|
|
164
|
+
|
|
165
|
+
> **removeMetric**(`id`): `Promise`\<`void`\>
|
|
166
|
+
|
|
167
|
+
Remove metric.
|
|
168
|
+
|
|
169
|
+
#### Parameters
|
|
170
|
+
|
|
171
|
+
##### id
|
|
172
|
+
|
|
173
|
+
`string`
|
|
174
|
+
|
|
175
|
+
The id of the metric.
|
|
176
|
+
|
|
177
|
+
#### Returns
|
|
178
|
+
|
|
179
|
+
`Promise`\<`void`\>
|
|
180
|
+
|
|
181
|
+
A promise that resolves when the metric and all its values have been removed.
|
|
182
|
+
|
|
183
|
+
***
|
|
184
|
+
|
|
185
|
+
### query()? {#query}
|
|
186
|
+
|
|
187
|
+
> `optional` **query**(`type?`, `cursor?`, `limit?`): `Promise`\<\{ `entities`: [`ITelemetryMetric`](ITelemetryMetric.md)[]; `cursor?`: `string`; \}\>
|
|
188
|
+
|
|
189
|
+
Query the metrics.
|
|
190
|
+
|
|
191
|
+
#### Parameters
|
|
192
|
+
|
|
193
|
+
##### type?
|
|
194
|
+
|
|
195
|
+
[`MetricType`](../type-aliases/MetricType.md)
|
|
196
|
+
|
|
197
|
+
The type of the metric.
|
|
198
|
+
|
|
199
|
+
##### cursor?
|
|
200
|
+
|
|
201
|
+
`string`
|
|
202
|
+
|
|
203
|
+
The cursor to request the next chunk of entities.
|
|
204
|
+
|
|
205
|
+
##### limit?
|
|
206
|
+
|
|
207
|
+
`number`
|
|
208
|
+
|
|
209
|
+
Limit the number of entities to return.
|
|
210
|
+
|
|
211
|
+
#### Returns
|
|
212
|
+
|
|
213
|
+
`Promise`\<\{ `entities`: [`ITelemetryMetric`](ITelemetryMetric.md)[]; `cursor?`: `string`; \}\>
|
|
214
|
+
|
|
215
|
+
All the entities for the storage matching the conditions,
|
|
216
|
+
and a cursor which can be used to request more entities.
|
|
217
|
+
|
|
218
|
+
#### Throws
|
|
219
|
+
|
|
220
|
+
NotImplementedError if the implementation does not support retrieval.
|
|
221
|
+
|
|
222
|
+
***
|
|
223
|
+
|
|
224
|
+
### queryValues()? {#queryvalues}
|
|
225
|
+
|
|
226
|
+
> `optional` **queryValues**(`id`, `timeStart?`, `timeEnd?`, `cursor?`, `limit?`): `Promise`\<\{ `metric`: [`ITelemetryMetric`](ITelemetryMetric.md); `entities`: [`ITelemetryMetricValue`](ITelemetryMetricValue.md)[]; `cursor?`: `string`; \}\>
|
|
227
|
+
|
|
228
|
+
Query the metric values.
|
|
229
|
+
|
|
230
|
+
#### Parameters
|
|
231
|
+
|
|
232
|
+
##### id
|
|
233
|
+
|
|
234
|
+
`string`
|
|
235
|
+
|
|
236
|
+
The id of the metric.
|
|
237
|
+
|
|
238
|
+
##### timeStart?
|
|
239
|
+
|
|
240
|
+
`number`
|
|
241
|
+
|
|
242
|
+
The inclusive time as the start of the metric entries.
|
|
243
|
+
|
|
244
|
+
##### timeEnd?
|
|
245
|
+
|
|
246
|
+
`number`
|
|
247
|
+
|
|
248
|
+
The inclusive time as the end of the metric entries.
|
|
249
|
+
|
|
250
|
+
##### cursor?
|
|
251
|
+
|
|
252
|
+
`string`
|
|
253
|
+
|
|
254
|
+
The cursor to request the next chunk of entities.
|
|
255
|
+
|
|
256
|
+
##### limit?
|
|
257
|
+
|
|
258
|
+
`number`
|
|
259
|
+
|
|
260
|
+
Limit the number of entities to return.
|
|
261
|
+
|
|
262
|
+
#### Returns
|
|
263
|
+
|
|
264
|
+
`Promise`\<\{ `metric`: [`ITelemetryMetric`](ITelemetryMetric.md); `entities`: [`ITelemetryMetricValue`](ITelemetryMetricValue.md)[]; `cursor?`: `string`; \}\>
|
|
265
|
+
|
|
266
|
+
All the entities for the storage matching the conditions,
|
|
267
|
+
and a cursor which can be used to request more entities.
|
|
268
|
+
|
|
269
|
+
#### Throws
|
|
270
|
+
|
|
271
|
+
NotImplementedError if the implementation does not support retrieval.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Interface: ITelemetryCreateMetricRequest
|
|
2
|
+
|
|
3
|
+
Create one or more telemetry metrics.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### body {#body}
|
|
8
|
+
|
|
9
|
+
> **body**: [`ITelemetryMetric`](ITelemetryMetric.md) \| [`ITelemetryMetric`](ITelemetryMetric.md)[]
|
|
10
|
+
|
|
11
|
+
The data to be used in the create. A single metric fails if it already exists; an array
|
|
12
|
+
declares the set that should exist, creating the ones that are missing.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Interface: ITelemetryGetMetricResponse
|
|
2
|
+
|
|
3
|
+
Get a telemetry metric response.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### body {#body}
|
|
8
|
+
|
|
9
|
+
> **body**: `object`
|
|
10
|
+
|
|
11
|
+
The body parameters.
|
|
12
|
+
|
|
13
|
+
#### metric
|
|
14
|
+
|
|
15
|
+
> **metric**: [`ITelemetryMetric`](ITelemetryMetric.md)
|
|
16
|
+
|
|
17
|
+
The metric.
|
|
18
|
+
|
|
19
|
+
#### value?
|
|
20
|
+
|
|
21
|
+
> `optional` **value?**: [`ITelemetryMetricValue`](ITelemetryMetricValue.md)
|
|
22
|
+
|
|
23
|
+
The latest metric value.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Interface: ITelemetryGetMetricValueRequest
|
|
2
|
+
|
|
3
|
+
Get a telemetry metric value.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### pathParams {#pathparams}
|
|
8
|
+
|
|
9
|
+
> **pathParams**: `object`
|
|
10
|
+
|
|
11
|
+
The path parameters.
|
|
12
|
+
|
|
13
|
+
#### id
|
|
14
|
+
|
|
15
|
+
> **id**: `string`
|
|
16
|
+
|
|
17
|
+
The id of the metric.
|
|
18
|
+
|
|
19
|
+
#### valueId
|
|
20
|
+
|
|
21
|
+
> **valueId**: `string`
|
|
22
|
+
|
|
23
|
+
The id of the metric value.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Interface: ITelemetryListRequest
|
|
2
|
+
|
|
3
|
+
Get the a list of the telemetry metrics.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### query? {#query}
|
|
8
|
+
|
|
9
|
+
> `optional` **query?**: `object`
|
|
10
|
+
|
|
11
|
+
The query parameters.
|
|
12
|
+
|
|
13
|
+
#### type?
|
|
14
|
+
|
|
15
|
+
> `optional` **type?**: `string`
|
|
16
|
+
|
|
17
|
+
The type of the metric.
|
|
18
|
+
|
|
19
|
+
#### cursor?
|
|
20
|
+
|
|
21
|
+
> `optional` **cursor?**: `string`
|
|
22
|
+
|
|
23
|
+
The optional cursor to get next chunk.
|
|
24
|
+
|
|
25
|
+
#### limit?
|
|
26
|
+
|
|
27
|
+
> `optional` **limit?**: `string`
|
|
28
|
+
|
|
29
|
+
Limit the number of entities to return.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Interface: ITelemetryListResponse
|
|
2
|
+
|
|
3
|
+
Response for telemetry list request.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### body {#body}
|
|
8
|
+
|
|
9
|
+
> **body**: `object`
|
|
10
|
+
|
|
11
|
+
The response payload.
|
|
12
|
+
|
|
13
|
+
#### entities
|
|
14
|
+
|
|
15
|
+
> **entities**: [`ITelemetryMetric`](ITelemetryMetric.md)[]
|
|
16
|
+
|
|
17
|
+
The metrics.
|
|
18
|
+
|
|
19
|
+
#### cursor?
|
|
20
|
+
|
|
21
|
+
> `optional` **cursor?**: `string`
|
|
22
|
+
|
|
23
|
+
An optional cursor, when defined can be used to call find to get more entities.
|