-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Support addition of arbitrary properties in evaluation context #1435
Comments
hi @toddbaert, I'd like to try working on this one, could you assign it to me please? |
Yes, absolutely! Assigned. |
|
|
@toddbaert the PR is ready |
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: