Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
arriIsHere committed Dec 3, 2024
1 parent 228dc42 commit 4c571bf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ export class FetchInstrumentation extends InstrumentationBase<FetchInstrumentati
},
api.trace.setSpan(api.context.active(), span)
);
web.addSpanNetworkEvents(childSpan, corsPreFlightRequest, this.getConfig().ignoreNetworkEvents);
web.addSpanNetworkEvents(
childSpan,
corsPreFlightRequest,
this.getConfig().ignoreNetworkEvents
);
childSpan.end(
corsPreFlightRequest[web.PerformanceTimingNames.RESPONSE_END]
);
Expand Down Expand Up @@ -260,7 +264,11 @@ export class FetchInstrumentation extends InstrumentationBase<FetchInstrumentati
this._addChildSpan(span, corsPreFlightRequest);
this._markResourceAsUsed(corsPreFlightRequest);
}
web.addSpanNetworkEvents(span, mainRequest, this.getConfig().ignoreNetworkEvents);
web.addSpanNetworkEvents(
span,
mainRequest,
this.getConfig().ignoreNetworkEvents
);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ export class XMLHttpRequestInstrumentation extends InstrumentationBase<XMLHttpRe
const childSpan = this.tracer.startSpan('CORS Preflight', {
startTime: corsPreFlightRequest[PTN.FETCH_START],
});
addSpanNetworkEvents(childSpan, corsPreFlightRequest, this.getConfig().ignoreNetworkEvents);
addSpanNetworkEvents(
childSpan,
corsPreFlightRequest,
this.getConfig().ignoreNetworkEvents
);
childSpan.end(corsPreFlightRequest[PTN.RESPONSE_END]);
});
}
Expand Down Expand Up @@ -298,7 +302,11 @@ export class XMLHttpRequestInstrumentation extends InstrumentationBase<XMLHttpRe
this._addChildSpan(span, corsPreFlightRequest);
this._markResourceAsUsed(corsPreFlightRequest);
}
addSpanNetworkEvents(span, mainRequest, this.getConfig().ignoreNetworkEvents);
addSpanNetworkEvents(
span,
mainRequest,
this.getConfig().ignoreNetworkEvents
);
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-sdk-trace-web/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function addSpanNetworkEvents(
resource: PerformanceEntries,
ignoreNetworkEvents = false
): void {
if(!ignoreNetworkEvents) {
if (!ignoreNetworkEvents) {
addSpanNetworkEvent(span, PTN.FETCH_START, resource);
addSpanNetworkEvent(span, PTN.DOMAIN_LOOKUP_START, resource);
addSpanNetworkEvent(span, PTN.DOMAIN_LOOKUP_END, resource);
Expand Down

0 comments on commit 4c571bf

Please sign in to comment.