[FEATURE] Support addition of arbitrary properties in evaluation context #1435
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Requirements
Currently, flagd injects a couple standard properties into the evaluation context (
$flagd.flagKey
,$flagd.timestamp
).In addition, we want to support the addition of ANY arbitrary string properties specified on the command line.
The command line should look something like this:
flagd start -X name=jane -X age=31 ...
orflagd start --context-value name=jane --context-value age=31 ...
The above example will add the key/value pairs
"name": "jane"
and"age": "31"
to the evaluation context for every evaluation.Note that values are all strings - if desired, JSONLogic can be used in rules to convert them to other types.
Also note that there's no prefix associated with these additional fields.
In addition to adding these values to the evaluation context for all evaluations done in the flagd daemon itself, flagd should return these values in the
sync-metadata
call, so that in-process providers can add these values to their evaluations as well.The text was updated successfully, but these errors were encountered: