-
Notifications
You must be signed in to change notification settings - Fork 51
Description
Consider ImmutableStructure.asMap() 1 or ImmutableStructure. asObjectMap() 2 methods. These expose the attributes but they do not include the targeting key 3.
This could lead to unexpected behaviors where evaluations miss targeting key if provider authors overlook the implementation details (see 4). In contrast, go-sdk perform a context flattening to include targeting key 5 and js-sdk context is a record hence this issue does not exist in them.
AC
If agreed, we should include the targeting key in bulk exporters (ex:- ctx.asObject) as well as improve overall context handling by documentation improvements
Footnotes
-
https://github.com/open-feature/java-sdk/blob/v1.7.3/src/main/java/dev/openfeature/sdk/MutableStructure.java#L90 ↩
-
https://github.com/open-feature/java-sdk/blob/v1.7.3/src/main/java/dev/openfeature/sdk/AbstractStructure.java#L25 ↩
-
https://github.com/open-feature/java-sdk/blob/v1.7.3/src/main/java/dev/openfeature/sdk/ImmutableContext.java#L21 ↩
-
https://github.com/open-feature/java-sdk-contrib/pull/676 ↩
-
https://github.com/open-feature/go-sdk/blob/main/openfeature/client.go#L687-L695 ↩