@opentelemetry/sdk-metrics
Advanced tools
Comparing version 1.15.1 to 1.15.2
@@ -41,2 +41,6 @@ /* | ||
if (context === void 0) { context = contextApi.active(); } | ||
if (typeof value !== 'number') { | ||
diag.warn("non-number value provided to metric " + this._descriptor.name + ": " + value); | ||
return; | ||
} | ||
if (this._descriptor.valueType === ValueType.INT && | ||
@@ -46,2 +50,6 @@ !Number.isInteger(value)) { | ||
value = Math.trunc(value); | ||
// ignore non-finite values. | ||
if (!Number.isInteger(value)) { | ||
return; | ||
} | ||
} | ||
@@ -48,0 +56,0 @@ this._writableMetricStorage.record(value, attributes, context, millisToHrTime(Date.now())); |
@@ -35,2 +35,6 @@ /* | ||
if (attributes === void 0) { attributes = {}; } | ||
if (typeof value !== 'number') { | ||
diag.warn("non-number value provided to metric " + this._descriptor.name + ": " + value); | ||
return; | ||
} | ||
if (this._descriptor.valueType === ValueType.INT && | ||
@@ -40,2 +44,6 @@ !Number.isInteger(value)) { | ||
value = Math.trunc(value); | ||
// ignore non-finite values. | ||
if (!Number.isInteger(value)) { | ||
return; | ||
} | ||
} | ||
@@ -70,2 +78,6 @@ this._buffer.set(attributes, value); | ||
} | ||
if (typeof value !== 'number') { | ||
diag.warn("non-number value provided to metric " + metric._descriptor.name + ": " + value); | ||
return; | ||
} | ||
if (metric._descriptor.valueType === ValueType.INT && | ||
@@ -75,2 +87,6 @@ !Number.isInteger(value)) { | ||
value = Math.trunc(value); | ||
// ignore non-finite values. | ||
if (!Number.isInteger(value)) { | ||
return; | ||
} | ||
} | ||
@@ -77,0 +93,0 @@ map.set(attributes, value); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.15.1"; | ||
export declare const VERSION = "1.15.2"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export var VERSION = '1.15.1'; | ||
export var VERSION = '1.15.2'; | ||
//# sourceMappingURL=version.js.map |
@@ -24,2 +24,6 @@ /* | ||
_record(value, attributes = {}, context = contextApi.active()) { | ||
if (typeof value !== 'number') { | ||
diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${value}`); | ||
return; | ||
} | ||
if (this._descriptor.valueType === ValueType.INT && | ||
@@ -29,2 +33,6 @@ !Number.isInteger(value)) { | ||
value = Math.trunc(value); | ||
// ignore non-finite values. | ||
if (!Number.isInteger(value)) { | ||
return; | ||
} | ||
} | ||
@@ -31,0 +39,0 @@ this._writableMetricStorage.record(value, attributes, context, millisToHrTime(Date.now())); |
@@ -34,2 +34,6 @@ /* | ||
observe(value, attributes = {}) { | ||
if (typeof value !== 'number') { | ||
diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${value}`); | ||
return; | ||
} | ||
if (this._descriptor.valueType === ValueType.INT && | ||
@@ -39,2 +43,6 @@ !Number.isInteger(value)) { | ||
value = Math.trunc(value); | ||
// ignore non-finite values. | ||
if (!Number.isInteger(value)) { | ||
return; | ||
} | ||
} | ||
@@ -66,2 +74,6 @@ this._buffer.set(attributes, value); | ||
} | ||
if (typeof value !== 'number') { | ||
diag.warn(`non-number value provided to metric ${metric._descriptor.name}: ${value}`); | ||
return; | ||
} | ||
if (metric._descriptor.valueType === ValueType.INT && | ||
@@ -71,2 +83,6 @@ !Number.isInteger(value)) { | ||
value = Math.trunc(value); | ||
// ignore non-finite values. | ||
if (!Number.isInteger(value)) { | ||
return; | ||
} | ||
} | ||
@@ -73,0 +89,0 @@ map.set(attributes, value); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.15.1"; | ||
export declare const VERSION = "1.15.2"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export const VERSION = '1.15.1'; | ||
export const VERSION = '1.15.2'; | ||
//# sourceMappingURL=version.js.map |
@@ -27,2 +27,6 @@ "use strict"; | ||
_record(value, attributes = {}, context = api_1.context.active()) { | ||
if (typeof value !== 'number') { | ||
api_1.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${value}`); | ||
return; | ||
} | ||
if (this._descriptor.valueType === api_1.ValueType.INT && | ||
@@ -32,2 +36,6 @@ !Number.isInteger(value)) { | ||
value = Math.trunc(value); | ||
// ignore non-finite values. | ||
if (!Number.isInteger(value)) { | ||
return; | ||
} | ||
} | ||
@@ -34,0 +42,0 @@ this._writableMetricStorage.record(value, attributes, context, (0, core_1.millisToHrTime)(Date.now())); |
@@ -37,2 +37,6 @@ "use strict"; | ||
observe(value, attributes = {}) { | ||
if (typeof value !== 'number') { | ||
api_1.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${value}`); | ||
return; | ||
} | ||
if (this._descriptor.valueType === api_1.ValueType.INT && | ||
@@ -42,2 +46,6 @@ !Number.isInteger(value)) { | ||
value = Math.trunc(value); | ||
// ignore non-finite values. | ||
if (!Number.isInteger(value)) { | ||
return; | ||
} | ||
} | ||
@@ -70,2 +78,6 @@ this._buffer.set(attributes, value); | ||
} | ||
if (typeof value !== 'number') { | ||
api_1.diag.warn(`non-number value provided to metric ${metric._descriptor.name}: ${value}`); | ||
return; | ||
} | ||
if (metric._descriptor.valueType === api_1.ValueType.INT && | ||
@@ -75,2 +87,6 @@ !Number.isInteger(value)) { | ||
value = Math.trunc(value); | ||
// ignore non-finite values. | ||
if (!Number.isInteger(value)) { | ||
return; | ||
} | ||
} | ||
@@ -77,0 +93,0 @@ map.set(attributes, value); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.15.1"; | ||
export declare const VERSION = "1.15.2"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '1.15.1'; | ||
exports.VERSION = '1.15.2'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/sdk-metrics", | ||
"version": "1.15.1", | ||
"version": "1.15.2", | ||
"description": "OpenTelemetry metrics SDK", | ||
@@ -57,3 +57,3 @@ "main": "build/src/index.js", | ||
"devDependencies": { | ||
"@babel/core": "7.22.9", | ||
"@babel/core": "7.22.10", | ||
"@opentelemetry/api": ">=1.3.0 <1.5.0", | ||
@@ -63,3 +63,3 @@ "@types/lodash.merge": "4.6.7", | ||
"@types/node": "18.6.5", | ||
"@types/sinon": "10.0.15", | ||
"@types/sinon": "10.0.16", | ||
"babel-plugin-istanbul": "6.1.1", | ||
@@ -74,3 +74,3 @@ "codecov": "3.8.3", | ||
"karma-webpack": "4.0.2", | ||
"lerna": "7.1.3", | ||
"lerna": "7.1.4", | ||
"mocha": "10.2.0", | ||
@@ -90,4 +90,4 @@ "nyc": "15.1.0", | ||
"dependencies": { | ||
"@opentelemetry/core": "1.15.1", | ||
"@opentelemetry/resources": "1.15.1", | ||
"@opentelemetry/core": "1.15.2", | ||
"@opentelemetry/resources": "1.15.2", | ||
"lodash.merge": "^4.6.2" | ||
@@ -97,3 +97,3 @@ }, | ||
"sideEffects": false, | ||
"gitHead": "9f71800fdc2a5ee5055684037a12498af71955f2" | ||
"gitHead": "48fb15862e801b742059a3e39dbcc8ef4c10b2e2" | ||
} |
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
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
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
1848194
21249
+ Added@opentelemetry/core@1.15.2(transitive)
+ Added@opentelemetry/resources@1.15.2(transitive)
+ Added@opentelemetry/semantic-conventions@1.15.2(transitive)
- Removed@opentelemetry/core@1.15.1(transitive)
- Removed@opentelemetry/resources@1.15.1(transitive)
- Removed@opentelemetry/semantic-conventions@1.15.1(transitive)
Updated@opentelemetry/core@1.15.2