@opentelemetry/instrumentation-fetch
Advanced tools
Comparing version
@@ -245,18 +245,12 @@ /* | ||
plugin._applyAttributesAfterFetch(span, options, response); | ||
var spanResponse = { | ||
status: response.status, | ||
statusText: response.statusText, | ||
headers: response.headers, | ||
url: url | ||
}; | ||
if (response.status >= 200 && response.status < 400) { | ||
if (response.url != null && response.url !== '') { | ||
spanResponse.url = url; | ||
} | ||
plugin._endSpan(span, spanData, response); | ||
} | ||
plugin._endSpan(span, spanData, { | ||
status: response.status, | ||
statusText: response.statusText, | ||
url: url, | ||
}); | ||
else { | ||
plugin._endSpan(span, spanData, { | ||
status: response.status, | ||
statusText: response.statusText, | ||
url: url, | ||
}); | ||
} | ||
} | ||
@@ -263,0 +257,0 @@ function onSuccess(span, resolve, response) { |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.31.0"; | ||
export declare const VERSION = "0.32.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export var VERSION = '0.31.0'; | ||
export var VERSION = '0.32.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -220,18 +220,12 @@ /* | ||
plugin._applyAttributesAfterFetch(span, options, response); | ||
const spanResponse = { | ||
status: response.status, | ||
statusText: response.statusText, | ||
headers: response.headers, | ||
url | ||
}; | ||
if (response.status >= 200 && response.status < 400) { | ||
if (response.url != null && response.url !== '') { | ||
spanResponse.url = url; | ||
} | ||
plugin._endSpan(span, spanData, response); | ||
} | ||
plugin._endSpan(span, spanData, { | ||
status: response.status, | ||
statusText: response.statusText, | ||
url, | ||
}); | ||
else { | ||
plugin._endSpan(span, spanData, { | ||
status: response.status, | ||
statusText: response.statusText, | ||
url, | ||
}); | ||
} | ||
} | ||
@@ -238,0 +232,0 @@ function onSuccess(span, resolve, response) { |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.31.0"; | ||
export declare const VERSION = "0.32.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export const VERSION = '0.31.0'; | ||
export const VERSION = '0.32.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -223,18 +223,12 @@ "use strict"; | ||
plugin._applyAttributesAfterFetch(span, options, response); | ||
const spanResponse = { | ||
status: response.status, | ||
statusText: response.statusText, | ||
headers: response.headers, | ||
url | ||
}; | ||
if (response.status >= 200 && response.status < 400) { | ||
if (response.url != null && response.url !== '') { | ||
spanResponse.url = url; | ||
} | ||
plugin._endSpan(span, spanData, response); | ||
} | ||
plugin._endSpan(span, spanData, { | ||
status: response.status, | ||
statusText: response.statusText, | ||
url, | ||
}); | ||
else { | ||
plugin._endSpan(span, spanData, { | ||
status: response.status, | ||
statusText: response.statusText, | ||
url, | ||
}); | ||
} | ||
} | ||
@@ -241,0 +235,0 @@ function onSuccess(span, resolve, response) { |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.31.0"; | ||
export declare const VERSION = "0.32.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.31.0'; | ||
exports.VERSION = '0.32.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-fetch", | ||
"version": "0.31.0", | ||
"version": "0.32.0", | ||
"description": "OpenTelemetry fetch automatic instrumentation package.", | ||
@@ -59,8 +59,8 @@ "main": "build/src/index.js", | ||
"@opentelemetry/api": "^1.0.0", | ||
"@opentelemetry/context-zone": "1.5.0", | ||
"@opentelemetry/propagator-b3": "1.5.0", | ||
"@opentelemetry/sdk-trace-base": "1.5.0", | ||
"@types/mocha": "8.2.3", | ||
"@types/node": "14.17.33", | ||
"@types/sinon": "10.0.6", | ||
"@opentelemetry/context-zone": "1.6.0", | ||
"@opentelemetry/propagator-b3": "1.6.0", | ||
"@opentelemetry/sdk-trace-base": "1.6.0", | ||
"@types/mocha": "9.1.1", | ||
"@types/node": "18.6.5", | ||
"@types/sinon": "10.0.13", | ||
"@types/webpack-env": "1.16.3", | ||
@@ -76,8 +76,8 @@ "babel-loader": "8.2.3", | ||
"karma-webpack": "4.0.2", | ||
"mocha": "7.2.0", | ||
"mocha": "10.0.0", | ||
"nyc": "15.1.0", | ||
"rimraf": "3.0.2", | ||
"sinon": "12.0.1", | ||
"ts-loader": "8.3.0", | ||
"ts-mocha": "9.0.2", | ||
"sinon": "14.0.0", | ||
"ts-loader": "8.4.0", | ||
"ts-mocha": "10.0.0", | ||
"typescript": "4.4.4", | ||
@@ -92,9 +92,9 @@ "webpack": "4.46.0", | ||
"dependencies": { | ||
"@opentelemetry/core": "1.5.0", | ||
"@opentelemetry/instrumentation": "0.31.0", | ||
"@opentelemetry/sdk-trace-web": "1.5.0", | ||
"@opentelemetry/semantic-conventions": "1.5.0" | ||
"@opentelemetry/core": "1.6.0", | ||
"@opentelemetry/instrumentation": "0.32.0", | ||
"@opentelemetry/sdk-trace-web": "1.6.0", | ||
"@opentelemetry/semantic-conventions": "1.6.0" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-fetch", | ||
"gitHead": "776656b6e0cd0fc49a52b734702bc77110e483f1" | ||
"gitHead": "a5abee69119cc41d9d34f6beb5c1826eef1ac0dd" | ||
} |
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
172288
-1.16%1711
-1.04%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated