File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/core/src/transports Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ import {
2424 updateRateLimits ,
2525} from '@sentry/utils' ;
2626
27+ import { getCurrentHub } from '../hub' ;
28+
2729export const DEFAULT_TRANSPORT_BUFFER_SIZE = 30 ;
2830
2931/**
@@ -40,11 +42,14 @@ export function createTransport(
4042 ) ,
4143) : Transport {
4244 let rateLimits : RateLimits = { } ;
43-
4445 const flush = ( timeout ?: number ) : PromiseLike < boolean > => buffer . drain ( timeout ) ;
46+ const client = getCurrentHub ( ) . getClient ( ) ;
4547
4648 function send ( envelope : Envelope ) : PromiseLike < void | TransportMakeRequestResponse > {
4749 const filteredEnvelopeItems : EnvelopeItem [ ] = [ ] ;
50+ if ( client && client . emit ) {
51+ client . emit ( 'beforeEnvelope' , envelope ) ;
52+ }
4853
4954 // Drop rate limited items from envelope
5055 forEachEnvelopeItem ( envelope , ( item , type ) => {
You can’t perform that action at this time.
0 commit comments