@emartech/aggregate-metric-logger
Advanced tools
Comparing version 5.2.0 to 5.2.1
{ | ||
"name": "@emartech/aggregate-metric-logger", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"description": "aggregate metrics in memory for logging", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -88,2 +88,16 @@ 'use strict'; | ||
module.exports = new GcpMetricCollector(); | ||
const collector = new GcpMetricCollector() | ||
exports.count = (metricName, labels = {}, value = 1) => | ||
collector.count(metricName, labels, value); | ||
exports.measure = (metricName, labels = {}, value = 1) => | ||
collector.measure(metricName, labels, value); | ||
exports.start = (metricName, labels = {}) => collector.start(metricName, labels); | ||
exports.stop = measurement => collector.stop(measurement); | ||
exports.reset = () => collector.reset(); | ||
exports.createGcpMetricsCollector = projectId => new GcpMetricCollector(projectId) |
52800
1310