@@ -26,8 +26,8 @@ class DedupeIntegration(Integration):
2626 def __init__ (self ):
2727 # type: () -> None
2828 self ._last_seen = ContextVar ("last-seen" , default = None )
29- self .in_app_include = [] # type: List[str]
30- self .in_app_exclude = [] # type: List[str]
29+ self .in_app_include = None # type: Optional[ List[str] ]
30+ self .in_app_exclude = None # type: Optional[ List[str] ]
3131 self .project_root = None # type: Optional[str]
3232
3333 def _is_frame_in_app (self , namespace , abs_path ):
@@ -87,23 +87,23 @@ def _create_exception_fingerprint(self, exc_info):
8787 @staticmethod
8888 def setup_once ():
8989 # type: () -> None
90- client = sentry_sdk .get_client ()
91- integration = client .get_integration (DedupeIntegration )
92- if integration is not None :
93- integration .in_app_include = client .options .get ("in_app_include" ) or []
94- integration .in_app_exclude = client .options .get ("in_app_exclude" ) or []
95- integration .project_root = client .options .get ("project_root" ) or None
96-
9790 @add_global_event_processor
9891 def processor (event , hint ):
9992 # type: (Event, Optional[Hint]) -> Optional[Event]
10093 if hint is None :
10194 return event
10295
103- integration = sentry_sdk .get_client ().get_integration (DedupeIntegration )
96+ client = sentry_sdk .get_client ()
97+ integration = client .get_integration (DedupeIntegration )
98+
10499 if integration is None :
105100 return event
106101
102+ if integration .in_app_include is None :
103+ integration .in_app_include = client .options .get ("in_app_include" ) or []
104+ integration .in_app_exclude = client .options .get ("in_app_exclude" ) or []
105+ integration .project_root = client .options .get ("project_root" ) or None
106+
107107 exc_info = hint .get ("exc_info" , None )
108108 if exc_info is None :
109109 return event
0 commit comments