-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Feature flag support for Strings #13144
Comments
Yeah, this would be great to have |
I'm really not sure why we have these requirements. I mean... I even had to hack around this to store JSON as base64 encoded multivariate keys just to get around this ridiculous limitation :D. I don't think there will be much friction to merge something like that if someone comes up with a PR... 🤔 |
@mariusandra Do you have any tips, which changes would be necessary to accomplish this? |
There's no limitation on the backend @weyert , the API accepts any strings, so would mean going into the form and removing the condition here: https://github.com/PostHog/posthog/blob/master/frontend/src/scenes/feature-flags/featureFlagLogic.ts#L185 & then testing it works well. This should work pretty well for basic strings. We're planning a bigger chunk of work for Q1 to allow arbitrary JSON payloads |
I think it is a good practice to keep feature flag as toggle for simplicity. For example: instead of
we can do
|
Hey all! The first iteration of this has been released and is currently in beta with posthog-js/posthog-node support. Payloads are configurable for both boolean flags and multivariate flags. Please send me an email at eric@posthog.com with your Posthog Cloud email if you want to give it a try! |
This is now available for general availability now |
Is your feature request related to a problem?
I'm trying to migrate from LaunchDarkly but the current limitations with feature flags in PostHog is making that very difficult. The biggest of which is being unable to have a feature flag as a
String
orJSON
I have tried the Multivariate flags which allows a feature flag to be a "key", but that "key" is very limited. For example I'm not able to put a URL as a key because it violates some special key requirements.
Same issue with stringified JSON
Describe the solution you'd like
Allow multivariate feature flags (or any type of feature flag) that can hold a value such as a String.
Describe alternatives you've considered
Alternatively make a new feature flag type that can hold a value, similar to how FlagSmith does it.
Thank you for your feature request – we love each and every one!
The text was updated successfully, but these errors were encountered: