Skip to content

Commit 87c7e58

Browse files
committed
Add context documentation
1 parent dd9c7cd commit 87c7e58

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

develop-docs/sdk/data-model/event-payloads/contexts.mdx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,3 +832,37 @@ The required field is `package` which should contain the package or framework wh
832832
}
833833
}
834834
```
835+
836+
## Feature Flag Context
837+
838+
The feature flag context contains information about the flags evaluated prior to an error occurring. Flag evaluation results are placed into the `values` key which is an array of 0 or more flag evaluation result objects.
839+
840+
`flag`
841+
842+
: **Required.** The name of the flag which was evaluated.
843+
844+
- Example: `"feature-is-enabled"`
845+
846+
`result`
847+
848+
: **Required.** The boolean result of flag evaluation.
849+
850+
- Example: `false`
851+
852+
853+
### Example Featuer Flag Context
854+
855+
```json
856+
{
857+
"contexts": {
858+
"flags": {
859+
"values": [
860+
{
861+
"flag": "my_flag_name",
862+
"result": true
863+
}
864+
]
865+
}
866+
}
867+
}
868+
```

0 commit comments

Comments
 (0)