File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
import type { Scope } from '@sentry/core' ;
2
2
import { prepareEvent } from '@sentry/core' ;
3
3
import type { IntegrationIndex } from '@sentry/core/build/types/integration' ;
4
- import type { Client , ReplayEvent } from '@sentry/types' ;
4
+ import type { Client , EventHint , ReplayEvent } from '@sentry/types' ;
5
5
6
6
/**
7
7
* Prepare a replay event & enrich it with the SDK metadata.
@@ -21,10 +21,17 @@ export async function prepareReplayEvent({
21
21
typeof client . _integrations === 'object' && client . _integrations !== null && ! Array . isArray ( client . _integrations )
22
22
? Object . keys ( client . _integrations )
23
23
: undefined ;
24
+
25
+ const eventHint : EventHint = { event_id, integrations } ;
26
+
27
+ if ( client . emit ) {
28
+ client . emit ( 'preprocessEvent' , event , eventHint ) ;
29
+ }
30
+
24
31
const preparedEvent = ( await prepareEvent (
25
32
client . getOptions ( ) ,
26
33
event ,
27
- { event_id , integrations } ,
34
+ eventHint ,
28
35
scope ,
29
36
) ) as ReplayEvent | null ;
30
37
You can’t perform that action at this time.
0 commit comments