Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst committed Jul 16, 2024
1 parent 9d1b35d commit 5ef066c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/browser-utils/src/metrics/browserMetrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,8 @@ export function _addResourceSpans(
const startTimestamp = timeOrigin + startTime;
const endTimestamp = startTimestamp + duration;

// SOMETHING HERE IS FUCKY

startAndEndSpan(span, startTimestamp, endTimestamp, {
name: resourceUrl.replace(WINDOW.location.origin, ''),
op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other',
Expand Down
1 change: 1 addition & 0 deletions packages/browser-utils/src/metrics/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function startAndEndSpan(
endTime: SpanTimeInput,
{ ...ctx }: StartSpanOptions,
): Span | undefined {
// SOMETHING HERE IS FUCKY
const parentStartTime = spanToJSON(parentSpan).start_timestamp;
if (parentStartTime && parentStartTime > startTimeInSeconds) {
// We can only do this for SentrySpans...
Expand Down

0 comments on commit 5ef066c

Please sign in to comment.