diff --git a/sdk_contrib/fetch/lib/fetch_p.js b/sdk_contrib/fetch/lib/fetch_p.js index dc8b1dca..20596184 100644 --- a/sdk_contrib/fetch/lib/fetch_p.js +++ b/sdk_contrib/fetch/lib/fetch_p.js @@ -71,7 +71,7 @@ function enableCapture(baseFetchFunction, requestClass, downstreamXRayEnabled, s const thisDownstreamXRayEnabled = !!downstreamXRayEnabled; const thisSubsegmentCallback = subsegmentCallback; // Standardize request information - const request = args[0] instanceof requestClass ? + const request = (args[0] instanceof requestClass && args.length === 1) ? args[0] : new requestClass(...args);