@opentelemetry/metrics
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -35,6 +35,3 @@ "use strict"; | ||
.map((k, i) => [k, ts.labelValues[i]]) | ||
.reduce((p, c) => ({ | ||
...p, | ||
[c[0]]: typeof c[1] === 'string' ? c[1] : c[1].value, | ||
}), {}); | ||
.reduce((p, c) => (Object.assign(Object.assign({}, p), { [c[0]]: typeof c[1] === 'string' ? c[1] : c[1].value })), {}); | ||
for (const point of ts.points) { | ||
@@ -41,0 +38,0 @@ console.log({ labels, value: point.value }); |
@@ -62,9 +62,5 @@ "use strict"; | ||
} | ||
const opt = { | ||
const opt = Object.assign(Object.assign({ | ||
// Counters are defined as monotonic by default | ||
monotonic: true, | ||
logger: this._logger, | ||
...types_1.DEFAULT_METRIC_OPTIONS, | ||
...options, | ||
}; | ||
monotonic: true, logger: this._logger }, types_1.DEFAULT_METRIC_OPTIONS), options); | ||
const counter = new Metric_1.CounterMetric(name, opt, () => { | ||
@@ -89,9 +85,5 @@ this._exportOneMetric(name); | ||
} | ||
const opt = { | ||
const opt = Object.assign(Object.assign({ | ||
// Gauges are defined as non-monotonic by default | ||
monotonic: false, | ||
logger: this._logger, | ||
...types_1.DEFAULT_METRIC_OPTIONS, | ||
...options, | ||
}; | ||
monotonic: false, logger: this._logger }, types_1.DEFAULT_METRIC_OPTIONS), options); | ||
const gauge = new Metric_1.GaugeMetric(name, opt, () => { | ||
@@ -98,0 +90,0 @@ this._exportOneMetric(name); |
{ | ||
"name": "@opentelemetry/metrics", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "OpenTelemetry metrics SDK", | ||
@@ -58,6 +58,6 @@ "main": "build/src/index.js", | ||
"dependencies": { | ||
"@opentelemetry/base": "^0.3.0", | ||
"@opentelemetry/core": "^0.3.0", | ||
"@opentelemetry/types": "^0.3.0" | ||
"@opentelemetry/base": "^0.3.1", | ||
"@opentelemetry/core": "^0.3.1", | ||
"@opentelemetry/types": "^0.3.1" | ||
} | ||
} |
72037
1459
Updated@opentelemetry/base@^0.3.1
Updated@opentelemetry/core@^0.3.1
Updated@opentelemetry/types@^0.3.1