File tree Expand file tree Collapse file tree 2 files changed +1
-29
lines changed Expand file tree Collapse file tree 2 files changed +1
-29
lines changed Original file line number Diff line number Diff line change 11import sentry_sdk
2- from sentry_sdk .integrations import Integration
3-
4-
5- class FeatureFlagsIntegration (Integration ):
6- """
7- Sentry integration for capturing feature flags on error events. To manually buffer flag data,
8- call `integrations.featureflags.add_feature_flag`. We recommend you do this on each flag
9- evaluation.
10-
11- See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags)
12- for more information.
13-
14- @example
15- ```
16- import sentry_sdk
17- from sentry_sdk.integrations.feature_flags import FeatureFlagsIntegration, add_feature_flag
18-
19- sentry_sdk.init(dsn="my_dsn", integrations=[FeatureFlagsIntegration()]);
20-
21- add_feature_flag('my-flag', true);
22- sentry_sdk.capture_exception(Exception('broke')); // 'my-flag' should be captured on this Sentry event.
23- ```
24- """
25-
26- identifier = "feature_flags"
27-
28- def setup_once ():
29- # type: () -> None
30- pass
312
323
334def add_feature_flag (flag , result ):
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ def __init__(self, ld_client=None):
3737 # Register the flag collection hook with the LD client.
3838 client .add_hook (LaunchDarklyHook ())
3939
40+ @staticmethod
4041 def setup_once ():
4142 # type: () -> None
4243 pass
You can’t perform that action at this time.
0 commit comments