-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(flags): Add LaunchDarkly Integration #3679
feat(flags): Add LaunchDarkly Integration #3679
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## cmanallen/flags-open-feature-integration #3679 +/- ##
============================================================================
- Coverage 84.33% 83.38% -0.95%
============================================================================
Files 135 136 +1
Lines 14326 14537 +211
Branches 2413 2469 +56
============================================================================
+ Hits 12082 12122 +40
- Misses 1494 1666 +172
+ Partials 750 749 -1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I'll let you work through the test coverage before approving.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
if client is None: | ||
try: | ||
client = ldclient.get() # global singleton. | ||
except Exception as exc: | ||
raise DidNotEnable("Error getting LaunchDarkly client. " + repr(exc)) | ||
|
||
if not client.is_initialized(): | ||
raise DidNotEnable("LaunchDarkly client is not initialized.") | ||
|
||
# Register the flag collection hook with the given client. | ||
client.add_hook(LaunchDarklyHook()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be moved to setup_once. You can call sentry_sdk.get_client().get_integration(LaunchDarklyIntegration)
to get the explicitly passed client from the init.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, just updated. When is setup_once
called? Do you know when setup_once is called? Why is it a staticmethod?
Do we need to worry about the failing checks, ex "Test Miscellaneous / Miscellaneous (latest) (3.12, ubuntu-20.04) (pull_request)" |
This reverts commit ead840f.
018cb0f
into
cmanallen/flags-open-feature-integration
Ref: