Skip to content
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

Simplify setup code for JS OpenFeatureIntegration #14645

Closed
aliu39 opened this issue Dec 10, 2024 · 1 comment
Closed

Simplify setup code for JS OpenFeatureIntegration #14645

aliu39 opened this issue Dec 10, 2024 · 1 comment
Assignees
Labels
Feature: Feature Flags Issues related to Sentry Feature Flags Support

Comments

@aliu39
Copy link
Member

aliu39 commented Dec 10, 2024

Description

Like in python, we can call addHooks in the integration's setup method, optionally taking in an OpenFeature client. With this the user no longer has to call addHooks manually, and setup will match what we have for most integrations.

Current setup code

This shouldn't be done immediately since the integration was just released in 8.43. However it's still considered open beta, so this can be done before GA.

Pros:

  • less setup code for users, less chance for error

Cons:

  • inconsistent with LD setup code, where this separate call is necessary. This isn't much of a con IMO, because we expect providers to be different, it's more important to have JS and Python consistent.
@aliu39 aliu39 moved this to Todo in Feature Flags Dec 10, 2024
@AbhiPrasad AbhiPrasad added the Feature: Feature Flags Issues related to Sentry Feature Flags Support label Dec 10, 2024
@aliu39 aliu39 changed the title Simplify setup code for OpenFeatureIntegration Simplify setup code for JS OpenFeatureIntegration Jan 13, 2025
@aliu39
Copy link
Member Author

aliu39 commented Jan 13, 2025

From #14838 (comment)

We have to rethink this since we decided to prioritize global tracking. The user's setup code could still be simplified, but prioritizing other FF work for now

It's not ideal to pass in the global OpenFeature class or addHooks method. Having the user call addHooks seems fine for now.

@aliu39 aliu39 closed this as completed Jan 13, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Feature Flags Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Feature Flags Issues related to Sentry Feature Flags Support
Projects
Status: Done
Development

No branches or pull requests

2 participants