Skip to content

Commit a60a64f

Browse files
committed
docs: small op doc fixes
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
1 parent 17cd08f commit a60a64f

3 files changed

Lines changed: 5 additions & 11 deletions

File tree

docs/reference/custom-operations/fractional-operation.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ description: flagd fractional custom operation
44

55
# Fractional Operation
66

7-
OpenFeature allows clients to pass contextual information which can then be used during a flag evaluation. For example, a client could pass the email address of the user.
7+
The `fractional` operation is a powerful custom JsonLogic operation which deterministically resolves a variant based on the defined distribution of each variant (as a relative weight).
8+
The value is an array; the first element is an optional JsonLogic expression to retrieve the "bucketing value" (used as the seed to the random assignment) and the remaining elements are arrays pairing a variant with a weight.
9+
The fractional operation is useful for A/B testing, general experimentation, and gradual releases.
810

911
```js
1012
// Factional evaluation property name used in a targeting rule
1113
"fractional": [
12-
// Evaluation context property used to determine the split
14+
// Optional evaluation context property used to determine the split
1315
// Note using `cat` and `$flagd.flagKey` is the suggested default to seed your hash value and prevent bucketing collisions
1416
{
1517
"cat": [
@@ -58,7 +60,7 @@ If not specified, the default weight for a variant is set to `1`, so an alternat
5860
]
5961
```
6062

61-
See the [headerColor](https://github.com/open-feature/flagd/blob/main/samples/example_flags.flagd.json#L88-#L133) flag.
63+
See the [headerColor](https://github.com/open-feature/flagd/blob/main/samples/example_flags.flagd.json#L88-#L133) example flag.
6264
The `defaultVariant` is `red`, but it contains a [targeting rule](../flag-definitions.md#targeting-rules), meaning a fractional evaluation occurs for flag evaluation with a `context` object containing `email` and where that `email` value contains `@faas.com`.
6365

6466
In this case, `25%` of the evaluations will receive `red`, `25%` will receive `blue`, and so on.

docs/reference/custom-operations/semver-operation.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ description: flagd semver custom operation
44

55
# Semantic Version Operation
66

7-
OpenFeature allows clients to pass contextual information which can then be used during a flag evaluation. For example, a client could pass the email address of the user.
8-
9-
In some scenarios, it is desirable to use that contextual information to segment the user population further and thus return dynamic values.
10-
117
The `sem_ver` evaluation checks if the given property matches a semantic versioning condition.
128
It returns 'true', if the value of the given property meets the condition, 'false' if not.
139
Note that the 'sem_ver' evaluation rule must contain exactly three items:

docs/reference/custom-operations/string-comparison-operation.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ description: flagd string custom operations
44

55
# Starts-With / Ends-With Operation
66

7-
OpenFeature allows clients to pass contextual information which can then be used during a flag evaluation. For example, a client could pass the email address of the user.
8-
9-
In some scenarios, it is desirable to use that contextual information to segment the user population further and thus return dynamic values.
10-
117
The `starts_with`/`ends_with` operation is a custom JsonLogic operation which selects a variant based on
128
whether the specified property starts/ends with a certain value.
139
The value is an array consisting of exactly two items, which both need to resolve to a string value.

0 commit comments

Comments
 (0)