open-feature / spec

OpenFeature specification
https://openfeature.dev
Apache License 2.0
612 stars 35 forks source link

Evaluation Context Propagation #81

Closed beeme1mr closed 5 months ago

beeme1mr commented 2 years ago

Summary

​ Evaluation context may be used to conditionally control the value returned from a flag evaluation. You could, for example, enable a feature for all users with a specific email domain. Using evaluation context propagation, application developers can set evaluation context where it's convenient (i.e. an auth service) and have it persist for the length of the request. ​

Objective

​ Define a specification for evaluation context propagation without introducing any third party dependencies in the OpenFeature SDK.

References

beeme1mr commented 1 year ago

There's a working proof of concept in the playground.

https://github.com/open-feature/playground/blob/main/packages/openfeature-js/src/index.ts

toddbaert commented 1 year ago

This needs a thorough OFEP, eventually.