Skip to content

Commit

Permalink
small ref
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Jul 23, 2024
1 parent ecdcba6 commit c67e225
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/core/src/baseclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -986,13 +986,15 @@ function processBeforeSend(
}

if (beforeSendTransaction) {
// We store the # of spans before processing in SDK metadata,
// so we can compare it afterwards to determine how many spans were dropped
const spanCountBefore = event.spans ? event.spans.length : 0;
event.sdkProcessingMetadata = {
...event.sdkProcessingMetadata,
spanCountBeforeProcessing: spanCountBefore,
};
if (event.spans) {
// We store the # of spans before processing in SDK metadata,
// so we can compare it afterwards to determine how many spans were dropped
const spanCountBefore = event.spans.length;
event.sdkProcessingMetadata = {
...event.sdkProcessingMetadata,
spanCountBeforeProcessing: spanCountBefore,
};
}
return beforeSendTransaction(event, hint);
}
}
Expand Down

0 comments on commit c67e225

Please sign in to comment.