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 3, 2022
1 parent d8f5d51 commit 5c9a1f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/integration.ts
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 5c9a1f8

Please sign in to comment.