@opentelemetry/exporter-prometheus
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -122,3 +122,3 @@ "use strict"; | ||
return; | ||
const labelKeys = record.descriptor.labelKeys; | ||
const labelValues = this._getLabelValues(record.descriptor.labelKeys, record.labels); | ||
const point = record.aggregator.toPoint(); | ||
@@ -130,10 +130,10 @@ if (metric instanceof prom_client_1.Counter) { | ||
// so the increment here behaves as a set value (increment from 0) | ||
metric.inc(this._getLabelValues(labelKeys, record.labels), point.value); | ||
metric.inc(labelValues, point.value, core_1.hrTimeToMilliseconds(point.timestamp)); | ||
} | ||
if (metric instanceof prom_client_1.Gauge) { | ||
if (record.aggregator instanceof metrics_1.CounterSumAggregator) { | ||
metric.set(this._getLabelValues(labelKeys, record.labels), point.value); | ||
metric.set(labelValues, point.value); | ||
} | ||
else if (record.aggregator instanceof metrics_1.ObserverAggregator) { | ||
metric.set(this._getLabelValues(labelKeys, record.labels), point.value, core_1.hrTimeToMilliseconds(point.timestamp)); | ||
metric.set(labelValues, point.value, core_1.hrTimeToMilliseconds(point.timestamp)); | ||
} | ||
@@ -165,5 +165,5 @@ } | ||
if (metric instanceof prom_client_1.Counter) { | ||
this._registry.removeSingleMetric(metricName); | ||
metric.remove(...record.descriptor.labelKeys.map(k => record.labels[k].toString())); | ||
} | ||
else if (metric) | ||
if (metric) | ||
return metric; | ||
@@ -170,0 +170,0 @@ return this._newMetric(record, metricName); |
@@ -16,2 +16,2 @@ /*! | ||
*/ | ||
export declare const VERSION = "0.6.0"; | ||
export declare const VERSION = "0.6.1"; |
@@ -19,3 +19,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.6.0'; | ||
exports.VERSION = '0.6.1'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/exporter-prometheus", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus", | ||
@@ -43,3 +43,3 @@ "main": "build/src/index.js", | ||
"devDependencies": { | ||
"@types/mocha": "^5.2.7", | ||
"@types/mocha": "^7.0.0", | ||
"@types/node": "^12.6.9", | ||
@@ -58,8 +58,8 @@ "codecov": "^3.6.1", | ||
"dependencies": { | ||
"@opentelemetry/api": "^0.6.0", | ||
"@opentelemetry/base": "^0.6.0", | ||
"@opentelemetry/core": "^0.6.0", | ||
"@opentelemetry/metrics": "^0.6.0", | ||
"@opentelemetry/api": "^0.6.1", | ||
"@opentelemetry/base": "^0.6.1", | ||
"@opentelemetry/core": "^0.6.1", | ||
"@opentelemetry/metrics": "^0.6.1", | ||
"prom-client": "^11.5.3" | ||
} | ||
} |
36830
Updated@opentelemetry/api@^0.6.1
Updated@opentelemetry/base@^0.6.1
Updated@opentelemetry/core@^0.6.1