spotify / confidence-sdk-go

Apache License 2.0
2 stars 1 forks source link

fix: targeting key serialization fix #46

Closed fabriziodemaria closed 6 months ago

fabriziodemaria commented 6 months ago

The GO SDK flattens the context using targetingKey as key for the targeting key value in the context.

Other SDK pass the (non-flattened) EvaluationContext object to the Provider and let the latter decide how to encode the context. We might want to investigate more why the implementation in GO differs in these regards.

In the meantime, this fix allows to keep backwards compatibility and inter-operability between different backends at the cost of sending duplicate data. Note that the user can always set targeting_key as an attribute