File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,7 @@ def __init__(self, client=None):
3535
3636 if not client .is_initialized ():
3737 raise DidNotEnable ("LaunchDarkly client is not initialized." )
38-
39- # Register the flag collection hook with the given client.
40- client .add_hook (LaunchDarklyHook ())
38+ self .ld_client = client
4139
4240 @staticmethod
4341 def setup_once ():
@@ -51,6 +49,12 @@ def error_processor(event, _exc_info):
5149 scope = sentry_sdk .get_current_scope ()
5250 scope .add_error_processor (error_processor )
5351
52+ # Register the flag collection hook with the LD client.
53+ ld_client = (
54+ sentry_sdk .get_client ().get_integration (LaunchDarklyIntegration ).ld_client
55+ )
56+ ld_client .add_hook (LaunchDarklyHook ())
57+
5458
5559class LaunchDarklyHook (Hook ):
5660
You can’t perform that action at this time.
0 commit comments