@instana/core
Advanced tools
Comparing version 1.125.0 to 1.125.1
{ | ||
"name": "@instana/core", | ||
"version": "1.125.0", | ||
"version": "1.125.1", | ||
"description": "Core library for Instana's Node.js packages", | ||
@@ -136,3 +136,3 @@ "main": "src/index.js", | ||
}, | ||
"gitHead": "a5df61b17bd1b503ba5cd9c91e9da1f0d6250c72" | ||
"gitHead": "1f16807c1b62c5002f9952ed7b78ec9994704fe5" | ||
} |
@@ -80,3 +80,3 @@ /* | ||
/** | ||
* @param {String} name | ||
* @param {string} name | ||
*/ | ||
@@ -83,0 +83,0 @@ constructor(name) { |
@@ -430,7 +430,3 @@ /* | ||
span.ec = 1; | ||
if (err.code) { | ||
span.data.sqs.error = err.code; | ||
} else if (typeof err === 'string') { | ||
span.data.sqs.error = err; | ||
} | ||
span.data.sqs.error = err.message || err.code || JSON.stringify(err); | ||
} | ||
@@ -477,6 +473,14 @@ } | ||
span.disableAutoEnd(); | ||
const res = original.apply(ctx, originalArgs).then(data => { | ||
span.transmitManual(); | ||
return data; | ||
}); | ||
const res = original | ||
.apply(ctx, originalArgs) | ||
.then(data => { | ||
span.d = Date.now() - span.ts; | ||
span.transmitManual(); | ||
return data; | ||
}) | ||
.catch(err => { | ||
addErrorToSpan(err, span); | ||
span.d = Date.now() - span.ts; | ||
span.transmitManual(); | ||
}); | ||
return res; | ||
@@ -483,0 +487,0 @@ }); |
503665
14292