Skip to content

Commit

Permalink
add beforeSendTransaction to comment in getIntegrationsToSetup
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed Nov 2, 2022
1 parent 9e82822 commit a228925
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ export function getIntegrationsToSetup(options: Options): Integration[] {

const finalIntegrations = filterDuplicates(integrations);

// The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend`. It therefore
// has to run after all other integrations, so that the changes of all event processors will be reflected in the
// printed values. For lack of a more elegant way to guarantee that, we therefore locate it and, assuming it exists,
// pop it out of its current spot and shove it onto the end of the array.
// The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or
// `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event
// processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore
// locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.
const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug');
if (debugIndex !== -1) {
const [debugInstance] = finalIntegrations.splice(debugIndex, 1);
Expand Down

0 comments on commit a228925

Please sign in to comment.