-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into fix/file-exporter-pat…
…h-handling
- Loading branch information
Showing
88 changed files
with
5,543 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"maven":{"sdk":"1.12.0","providerKt":"0.1.0","providerJava":"0.3.0","android":"0.3.0"},"npm":{"core":"1.4.0","serverSDK":"1.15.1","providerServer":"0.7.3","providerWeb":"0.2.1"},"pypi":{"sdk":"0.7.1","provider":"0.2.1"},"nuget":{"sdk":"2.0.0","provider":"0.2.0"},"go":{"provider":"v0.2.1","sdk":"v1.13.0"}} | ||
{"maven":{"sdk":"1.12.0","providerKt":"0.1.0","providerJava":"0.3.0","android":"0.3.0"},"npm":{"core":"1.4.0","serverSDK":"1.15.1","webSDK":"1.2.4","providerWeb":"0.2.1"},"pypi":{"sdk":"0.7.1","provider":"0.2.1"},"nuget":{"sdk":"2.0.0","provider":"0.2.0"},"go":{"provider":"v0.2.1","sdk":"v1.13.0"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"position": 0, | ||
"collapsible": true, | ||
"collapsed": false | ||
} |
10 changes: 10 additions & 0 deletions
10
website/versioned_docs/version-v1.36.1/configure_flag/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"position": 20, | ||
"collapsible": true, | ||
"collapsed": true, | ||
"label": "Configure your feature flags", | ||
"link": { | ||
"type": "generated-index", | ||
"title": "Configure your feature flags" | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
website/versioned_docs/version-v1.36.1/configure_flag/custom_bucketing.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
sidebar_position: 22 | ||
description: How to bucket users based on a custom identifier | ||
--- | ||
|
||
# Custom bucketing | ||
|
||
When evaluating flags, the `targetingKey` is usually given a user ID. This key ensures that a user will always be in the same group for each flag. | ||
|
||
Sometimes, it is desireable to _bucket_ users based on a different value. The `bucketingKey` field in the flag configuration allows you to define a different identifier to be used instead. For example: | ||
|
||
```yaml | ||
first-flag: | ||
bucketingKey: "teamId" | ||
variations: | ||
A: false | ||
B: true | ||
defaultRule: # When no targeting match we use the defaultRule | ||
percentage: | ||
A: 50 | ||
B: 50 | ||
``` | ||
With this flag configuration, the `teamId` value will be used for hashing instead of `targetingKey`. The value must be provided to the evaluation context: | ||
|
||
|
||
```go | ||
user = ffcontext.NewEvaluationContextBuilder("user126") | ||
.AddCustom("teamId", "f74b72") | ||
.Build() | ||
ffclient.BoolVariation("first-flag", user, false) | ||
``` | ||
|
||
As a result, users who are members of the same team will receive the same flag variation, consistently. A different `bucketingKey` can be used per experiment, though normally you'll only have a handful of possible values. | ||
|
||
This is useful for A/B testing, permissions management and other use cases where targeting a consistent group of users is required. | ||
|
||
**Note**: if a value in the corresponding `bucketingKey` is not found in the evaluation context, the flag rules will not be evaluated, and the SDK will return the default value. |
Oops, something went wrong.