@opentelemetry/exporter-prometheus
Advanced tools
Comparing version 0.12.1-alpha.54 to 0.13.0
@@ -99,3 +99,3 @@ "use strict"; | ||
// However unlikely, if this happens the caller may retry the export | ||
cb(core_1.ExportResult.FAILED_RETRYABLE); | ||
cb({ code: core_1.ExportResultCode.FAILED }); | ||
return; | ||
@@ -107,3 +107,3 @@ } | ||
} | ||
cb(core_1.ExportResult.SUCCESS); | ||
cb({ code: core_1.ExportResultCode.SUCCESS }); | ||
} | ||
@@ -110,0 +110,0 @@ /** |
@@ -147,7 +147,23 @@ "use strict"; | ||
let cumulativeSum = 0; | ||
for (const [idx, val] of value.buckets.counts.entries()) { | ||
const countEntries = value.buckets.counts.entries(); | ||
let infiniteBoundaryDefined = false; | ||
for (const [idx, val] of countEntries) { | ||
cumulativeSum += val; | ||
const upperBound = value.buckets.boundaries[idx]; | ||
/** HistogramAggregator is producing different boundary output - | ||
* in one case not including inifinity values, in other - | ||
* full, e.g. [0, 100] and [0, 100, Infinity] | ||
* we should consider that in export, if Infinity is defined, use it | ||
* as boundary | ||
*/ | ||
if (upperBound === undefined && infiniteBoundaryDefined) { | ||
break; | ||
} | ||
if (upperBound === Infinity) { | ||
infiniteBoundaryDefined = true; | ||
} | ||
results += stringify(name + '_bucket', record.labels, cumulativeSum, this._appendTimestamp ? timestamp : undefined, { | ||
le: upperBound === undefined ? '+Inf' : String(upperBound), | ||
le: upperBound === undefined || upperBound === Infinity | ||
? '+Inf' | ||
: String(upperBound), | ||
}); | ||
@@ -154,0 +170,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.12.1-alpha.54+3f72613a"; | ||
export declare const VERSION = "0.13.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.12.1-alpha.54+3f72613a'; | ||
exports.VERSION = '0.13.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/exporter-prometheus", | ||
"version": "0.12.1-alpha.54+3f72613a", | ||
"version": "0.13.0", | ||
"description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus", | ||
@@ -44,5 +44,5 @@ "main": "build/src/index.js", | ||
"devDependencies": { | ||
"@types/mocha": "8.0.2", | ||
"@types/node": "14.0.27", | ||
"codecov": "3.7.2", | ||
"@types/mocha": "8.0.4", | ||
"@types/node": "14.14.10", | ||
"codecov": "3.8.1", | ||
"gts": "2.0.2", | ||
@@ -52,3 +52,3 @@ "mocha": "7.2.0", | ||
"rimraf": "3.0.2", | ||
"ts-mocha": "7.0.0", | ||
"ts-mocha": "8.0.0", | ||
"ts-node": "9.0.0", | ||
@@ -58,7 +58,7 @@ "typescript": "3.9.7" | ||
"dependencies": { | ||
"@opentelemetry/api": "^0.12.1-alpha.54+3f72613a", | ||
"@opentelemetry/core": "^0.12.1-alpha.54+3f72613a", | ||
"@opentelemetry/metrics": "^0.12.1-alpha.54+3f72613a" | ||
"@opentelemetry/api": "^0.13.0", | ||
"@opentelemetry/core": "^0.13.0", | ||
"@opentelemetry/metrics": "^0.13.0" | ||
}, | ||
"gitHead": "3f72613a36b6f97555a0fa7481755cf8b6cce1a7" | ||
"gitHead": "86cbd6798f9318c5920f9d9055f289a1c3f26500" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
49215
577
1
+ Added@opentelemetry/api@0.13.0(transitive)
+ Added@opentelemetry/context-base@0.13.0(transitive)
+ Added@opentelemetry/core@0.13.0(transitive)
+ Added@opentelemetry/metrics@0.13.0(transitive)
+ Added@opentelemetry/resources@0.13.0(transitive)
- Removed@opentelemetry/api@0.12.1-alpha.54(transitive)
- Removed@opentelemetry/context-base@0.12.1-alpha.54(transitive)
- Removed@opentelemetry/core@0.12.1-alpha.54(transitive)
- Removed@opentelemetry/metrics@0.12.1-alpha.54(transitive)
- Removed@opentelemetry/resources@0.12.1-alpha.54(transitive)
Updated@opentelemetry/api@^0.13.0
Updated@opentelemetry/core@^0.13.0