io.metricsAPIinterface
Properties (9)
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| description⚓︎ | string | x | Returns the description of the system. |
|
| id⚓︎ | string | x | ID of the system in the format |
|
| metrics⚓︎ | Metric[] | x | Returns an array of metrics. |
|
| name⚓︎ | string | x | Returns the name of the system. |
|
| parent⚓︎ | System | x | x | Returns the parent system of the current system. |
| path⚓︎ | string[] | x | An array of parent system names, starting with the root system name. |
|
| repo⚓︎ | Repository | x | Returns the repository of the system. |
|
| root⚓︎ | System | x | The root system in the repository. |
|
| subSystems⚓︎ | System[] | x | Returns an array of the subsystems. |
9 Methods
featureMetric()⚓︎
(feature: string, action: string, value: string) => void
The feature metric is under the subsystem with name "reporting".
Parameters (3)
| Name | Type | Required | Description |
|---|---|---|---|
| feature⚓︎ | string | The main feature you want to gather information about. |
|
| action⚓︎ | string | The specific action you want to track. |
|
| value⚓︎ | string | The payload of the metric - the value(s) you are interested in. |
Example
io.metrics.featureMetric("export", "exportToExcel", "file.xls");
getAggregateState()⚓︎
() => SystemStateInfo[]
Returns the aggregate system state represented as an array of the states of all subsystems.
numberMetric()⚓︎
(definition: string | MetricDefinition, value: number) => NumberMetric
Creates a new Number Metric.
Parameters (2)
| Name | Type | Required | Description |
|---|---|---|---|
| definition⚓︎ | string | MetricDefinition | Metric definition. |
|
| value⚓︎ | number | Metric value. |
objectMetric()⚓︎
(definition: string | MetricDefinition, value: any) => ObjectMetric
Creates a new Object Metric.
Parameters (2)
| Name | Type | Required | Description |
|---|---|---|---|
| definition⚓︎ | string | MetricDefinition | Metric definition. |
|
| value⚓︎ | any | Metric value. |
setState()⚓︎
(state: number, description?: string) => void
stringMetric()⚓︎
(definition: string | MetricDefinition, value: string) => StringMetric
Creates a new String Metric.
Parameters (2)
| Name | Type | Required | Description |
|---|---|---|---|
| definition⚓︎ | string | MetricDefinition | Metric definition. |
|
| value⚓︎ | string | Metric value. |
timestampMetric()⚓︎
(definition: string | MetricDefinition, value: any) => TimestampMetric
Creates a new Timestamp Metric.
Parameters (2)
| Name | Type | Required | Description |
|---|---|---|---|
| definition⚓︎ | string | MetricDefinition | Metric definition. |
|
| value⚓︎ | any | Metric value. |