Skip to content

Commit

Permalink
use new param for fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
arriIsHere committed Dec 3, 2024
1 parent 9fbf814 commit 228dc42
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ export class FetchInstrumentation extends InstrumentationBase<FetchInstrumentati
},
api.trace.setSpan(api.context.active(), span)
);
if (!this.getConfig().ignoreNetworkEvents) {
web.addSpanNetworkEvents(childSpan, corsPreFlightRequest);
}
web.addSpanNetworkEvents(childSpan, corsPreFlightRequest, this.getConfig().ignoreNetworkEvents);
childSpan.end(
corsPreFlightRequest[web.PerformanceTimingNames.RESPONSE_END]
);
Expand Down Expand Up @@ -262,9 +260,7 @@ export class FetchInstrumentation extends InstrumentationBase<FetchInstrumentati
this._addChildSpan(span, corsPreFlightRequest);
this._markResourceAsUsed(corsPreFlightRequest);
}
if (!this.getConfig().ignoreNetworkEvents) {
web.addSpanNetworkEvents(span, mainRequest);
}
web.addSpanNetworkEvents(span, mainRequest, this.getConfig().ignoreNetworkEvents);
}
}

Expand Down

0 comments on commit 228dc42

Please sign in to comment.