File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
docs/platforms/python/integrations/feature-flags Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ The [Unleash](https://www.getunleash.io/) integration tracks feature flag evalua
99
1010## Install
1111
12- Install ` sentry-sdk ` (>=2.19.3 ) and ` UnleashClient ` (>=6.0.1) from PyPI.
12+ Install ` sentry-sdk ` (>=2.20.0 ) and ` UnleashClient ` (>=6.0.1) from PyPI.
1313
1414``` bash
1515pip install --upgrade sentry-sdk UnleashClient
@@ -39,20 +39,22 @@ Test the integration by evaluating a feature flag using your Unleash SDK before
3939import sentry_sdk
4040from UnleashClient import UnleashClient
4141
42- unleash_client = UnleashClient(... ) # See Unleash quickstart.
43- test_flag_enabled = unleash_client.is_enabled( " test-flag " )
42+ unleash = UnleashClient(... ) # See Unleash quickstart.
43+ unleash.initialize_client( )
4444
45+ test_flag_enabled = unleash.is_enabled(" test-flag" )
4546sentry_sdk.capture_exception(Exception (" Something went wrong!" ))
4647```
4748
4849``` python {tabTitle: Python, using get_variant}
4950import sentry_sdk
5051from UnleashClient import UnleashClient
5152
52- unleash_client = UnleashClient(... ) # See Unleash quickstart.
53- test_flag_variant = unleash_client.get_variant(" test-flag" )
54- test_flag_enabled = test_flag_variant[" enabled" ]
53+ unleash = UnleashClient(... ) # See Unleash quickstart.
54+ unleash.initialize_client()
5555
56+ test_flag_variant = unleash.get_variant(" test-flag" )
57+ test_flag_enabled = test_flag_variant[" enabled" ]
5658sentry_sdk.capture_exception(Exception (" Something went wrong!" ))
5759```
5860
You can’t perform that action at this time.
0 commit comments