Doist / ffs

Feature flags solution that is fast, lean, and open-source.
http://ffs.delivery
MIT License
90 stars 6 forks source link

Automatically include metadata from clients in the env parameter #13

Open goncalossilva opened 2 years ago

goncalossilva commented 2 years ago

We can infer metadata from the execution environment in clients, such as OS, version, or language. This can be useful in several ways, such as allowing for more complex rules without manual setup (e.g., language-based flags). There should only be a few. If their use doesn't seem widely useful, it shouldn't be automatically tracked.

goncalossilva commented 2 years ago

As of now, the environment provides the following shortcuts:

ffs.setDeviceName("Pixel 6 Pro")
ffs.setDeviceOs("Android 12")
ffs.setDeviceLocale("en_US")

They are unused, but when we can infer this, we could set it automatically.

goncalossilva commented 2 years ago

Looking around to see what people might expect.

LaunchDarkly provides built-in attribute fields for you to fill in, but the SDK does not automatically collect any information. The exceptions to this are the os and device attributes used by mobile SDKs.

Ref: https://docs.launchdarkly.com/home/users/attributes#understanding-user-attributes

Others don't seem to do this automatically.