File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
packages/node/src/integrations Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,14 @@ export class ContextLines implements Integration {
5555 /**
5656 * @inheritDoc
5757 */
58- public setupOnce ( _addGlobalEventProcessor : ( callback : EventProcessor ) => void , getCurrentHub : ( ) => Hub ) : void {
59- // noop
60- }
61-
62- /** @inheritDoc */
63- public processEvent ( event : Event ) : Promise < Event > {
64- return this . addSourceContext ( event ) ;
58+ public setupOnce ( addGlobalEventProcessor : ( callback : EventProcessor ) => void , getCurrentHub : ( ) => Hub ) : void {
59+ addGlobalEventProcessor ( event => {
60+ const self = getCurrentHub ( ) . getIntegration ( ContextLines ) ;
61+ if ( ! self ) {
62+ return event ;
63+ }
64+ return this . addSourceContext ( event ) ;
65+ } ) ;
6566 }
6667
6768 /** Processes an event and adds context lines */
You can’t perform that action at this time.
0 commit comments