@opentelemetry/instrumentation-fetch
Advanced tools
Comparing version 0.18.1-alpha.16 to 0.18.1-alpha.18
@@ -31,3 +31,10 @@ "use strict"; | ||
const OBSERVER_WAIT_TIME_MS = 300; | ||
const urlNormalizingA = document.createElement('a'); | ||
// Used to normalize relative URLs | ||
let a; | ||
const getUrlNormalizingAnchor = () => { | ||
if (!a) { | ||
a = document.createElement('a'); | ||
} | ||
return a; | ||
}; | ||
/** | ||
@@ -253,6 +260,7 @@ * This class represents a fetch plugin for auto instrumentation | ||
const perfObsEntries = list.getEntries(); | ||
urlNormalizingA.href = spanUrl; | ||
const urlNormalizingAnchor = getUrlNormalizingAnchor(); | ||
urlNormalizingAnchor.href = spanUrl; | ||
perfObsEntries.forEach(entry => { | ||
if (entry.initiatorType === 'fetch' && | ||
entry.name === urlNormalizingA.href) { | ||
entry.name === urlNormalizingAnchor.href) { | ||
entries.push(entry); | ||
@@ -259,0 +267,0 @@ } |
{ | ||
"name": "@opentelemetry/instrumentation-fetch", | ||
"version": "0.18.1-alpha.16+f045eef8", | ||
"version": "0.18.1-alpha.18+b50f837d", | ||
"description": "OpenTelemetry fetch automatic instrumentation package.", | ||
@@ -48,3 +48,3 @@ "main": "build/src/index.js", | ||
"@opentelemetry/propagator-b3": "^0.18.0", | ||
"@opentelemetry/tracing": "^0.18.1-alpha.16+f045eef8", | ||
"@opentelemetry/tracing": "^0.18.0", | ||
"@types/mocha": "8.2.0", | ||
@@ -82,5 +82,5 @@ "@types/node": "14.14.20", | ||
"@opentelemetry/semantic-conventions": "^0.18.0", | ||
"@opentelemetry/web": "^0.18.1-alpha.16+f045eef8" | ||
"@opentelemetry/web": "^0.18.1-alpha.18+b50f837d" | ||
}, | ||
"gitHead": "f045eef8b02e6dda452aab3cdbeaf78b225c2fd4" | ||
"gitHead": "b50f837d60e891c13ab53225289ebb64b284d682" | ||
} |
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
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
44194
513