open-feature / playground

OpenFeature SDK demos and experimentation
https://openfeature.dev
Apache License 2.0
54 stars 27 forks source link

in Context, `userId` might be a bit overly specific #3

Closed moredip closed 2 years ago

moredip commented 2 years ago

In some controlled rollout scenarios, cohorting is done by something other than user. For example, if you're canary releasing a new caching layer you might choose to turn it on for a subset of servers. So calling the hash input userId might be a bit confusing. Not sure what a better name is thought 🙃

beeme1mr commented 2 years ago

The context type in this example is too simple. It should contain some agreed upon properties but accept arbitrary properties as well.

patricioe commented 2 years ago

Another idea, although a bit longer, can be targetingKey, or targetingId.

toddbaert commented 2 years ago

I see value in using the language of "targeting" for this as @patricioe suggests. Here's my reasoning:

We could shorten it with the term targetKey or targetId.

cc @beeme1mr

toddbaert commented 2 years ago

We have opened a spec issue for context: https://github.com/open-feature/spec/issues/43, I'll close this and we can move the discussion there.

weyert commented 2 years ago

I would suggest distinctId as in distinct identifier, for e.g. user, group, company etc