@emartech/aggregate-metric-logger 2.0.2 → 2.0.3
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/README.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ aggregate metrics in memory and log them every minute
|
|
|
4
4
|
## Setup
|
|
5
5
|
|
|
6
6
|
Set `METRIC_LOGGER_ENABLED` env variable to `true` for aggregate-metric-logger to
|
|
7
|
-
start collecting and logging
|
|
7
|
+
start collecting and logging measurements.
|
|
8
8
|
|
|
9
9
|
To change the default `aggregate-metric-logger` namespace used for logs, set
|
|
10
10
|
`METRIC_LOGGER_NAMESPACE` to a custom value.
|
|
@@ -19,7 +19,7 @@ an extra `count` property to the logs and log them at the end of the minute with
|
|
|
19
19
|
`@emartech/json-logger`.
|
|
20
20
|
|
|
21
21
|
```js
|
|
22
|
-
const
|
|
22
|
+
const metricLogger = require('@emartech/aggregate-metric-logger')
|
|
23
23
|
|
|
24
24
|
metricLogger.warn('etwas-went-wrong', { customer_id: 11 });
|
|
25
25
|
metricLogger.warn('etwas-went-wrong', { customer_id: 11 });
|
|
@@ -33,7 +33,7 @@ If you want aggregate measurements about something you need to simply call the `
|
|
|
33
33
|
for each value:
|
|
34
34
|
|
|
35
35
|
```js
|
|
36
|
-
const
|
|
36
|
+
const metricLogger = require('@emartech/aggregate-metric-logger')
|
|
37
37
|
|
|
38
38
|
metricLogger.measure('thing-to-measure', 14)
|
|
39
39
|
metricLogger.measure('thing-to-measure', 20)
|