Skip to content

Commit e1405f5

Browse files
Create a new documentation version v1.38.0 (#2640)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: thomaspoignant <17908063+thomaspoignant@users.noreply.github.com>
1 parent 0657f15 commit e1405f5

File tree

86 files changed

+5785
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+5785
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"position": 0,
3+
"collapsible": true,
4+
"collapsed": false
5+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"position": 20,
3+
"collapsible": true,
4+
"collapsed": true,
5+
"label": "Configure your feature flags",
6+
"link": {
7+
"type": "generated-index",
8+
"title": "Configure your feature flags"
9+
}
10+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
sidebar_position: 22
3+
description: How to bucket users based on a custom identifier
4+
---
5+
6+
# Custom bucketing
7+
8+
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.
9+
10+
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:
11+
12+
```yaml
13+
first-flag:
14+
bucketingKey: "teamId"
15+
variations:
16+
A: false
17+
B: true
18+
defaultRule: # When no targeting match we use the defaultRule
19+
percentage:
20+
A: 50
21+
B: 50
22+
```
23+
24+
With this flag configuration, the `teamId` value will be used for hashing instead of `targetingKey`. The value must be provided to the evaluation context:
25+
26+
27+
```go
28+
user = ffcontext.NewEvaluationContextBuilder("user126")
29+
.AddCustom("teamId", "f74b72")
30+
.Build()
31+
32+
ffclient.BoolVariation("first-flag", user, false)
33+
```
34+
35+
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.
36+
37+
This is useful for A/B testing, permissions management and other use cases where targeting a consistent group of users is required.
38+
39+
**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.
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
sidebar_position: 40
3+
description: How to export evaluation data?
4+
---
5+
6+
7+
8+
9+
10+
import {Cards} from '@site/src/components/doc/cardv2';
11+
import {ConfigCardContent} from "@site/src/components/doc/configCardContent";
12+
import customlogo from '@site/static/docs/collectors/custom.png';
13+
import filelogo from '@site/static/docs/collectors/file.png';
14+
import googlelogo from '@site/static/docs/collectors/google.png';
15+
import loglogo from '@site/static/docs/collectors/log.png';
16+
import s3logo from '@site/static/docs/collectors/s3.png';
17+
import webhooklogo from '@site/static/docs/collectors/webhook.png';
18+
import sqslogo from '@site/static/docs/collectors/sqs.png';
19+
import kafkalogo from '@site/static/docs/collectors/kafka.png';
20+
import pubsublogo from '@site/static/docs/collectors/pubsub.png';
21+
import kinesislogo from '@site/static/docs/collectors/kinesis.png';
22+
23+
24+
# How to export evaluation data
25+
GO Feature Flag allows for the collection of flag usage data.
26+
During flag evaluation, the key, flag variation and other non-sensitive information used are collected and cached for a
27+
configurable period of time.
28+
29+
The usage data is then written to a file in a chosen format (`parquet`, `JSON` or `CSV`) at a specified interval and
30+
exported to your desired location. This provides a single source for easy processing of the data. The feature can be
31+
configured with options for file format, flush interval, and file location.
32+
33+
To use, simply configure and use the feature flag as normal, and analyze the collected usage data.
34+
35+
## Available exporters
36+
<Cards cards={[
37+
{
38+
logoImg: s3logo,
39+
title: "AWS S3",
40+
content: <ConfigCardContent
41+
relayproxyLink={'../relay_proxy/configure_relay_proxy#s3-1'}
42+
goModuleLink={'../go_module/data_collection/s3'}
43+
/>
44+
},
45+
{
46+
logoImg: sqslogo,
47+
title: "AWS SQS",
48+
content: <ConfigCardContent
49+
relayproxyLink={'../relay_proxy/configure_relay_proxy#sqs'}
50+
goModuleLink={'../go_module/data_collection/sqs'}
51+
/>
52+
},
53+
{
54+
logoImg: kafkalogo,
55+
title: "Kafka",
56+
content: <ConfigCardContent
57+
relayproxyLink={'../relay_proxy/configure_relay_proxy#kafka'}
58+
goModuleLink={'../go_module/data_collection/kafka'}
59+
/>
60+
},
61+
{
62+
logoImg: googlelogo,
63+
title: "Google Storage",
64+
content: <ConfigCardContent
65+
relayproxyLink={'../relay_proxy/configure_relay_proxy#google-storage-1'}
66+
goModuleLink={'../go_module/data_collection/google_cloud_storage'}
67+
/>
68+
},
69+
{
70+
logoImg: pubsublogo,
71+
title: "Google PubSub",
72+
content: <ConfigCardContent
73+
relayproxyLink={'../relay_proxy/configure_relay_proxy#google-pubsub'}
74+
goModuleLink={'../go_module/data_collection/google_pubsub'}
75+
/>
76+
},
77+
{
78+
logoImg: webhooklogo,
79+
title: "Webhook",
80+
content: <ConfigCardContent
81+
relayproxyLink={'../relay_proxy/configure_relay_proxy#webhook'}
82+
goModuleLink={'../go_module/data_collection/webhook'}
83+
/>
84+
},
85+
{
86+
logoImg: filelogo,
87+
title: "Local File",
88+
content: <ConfigCardContent
89+
relayproxyLink={'../relay_proxy/configure_relay_proxy#file-1'}
90+
goModuleLink={'../go_module/data_collection/file'}
91+
/>
92+
},
93+
{
94+
logoImg: loglogo,
95+
title: "Log",
96+
content: <ConfigCardContent
97+
relayproxyLink={'../relay_proxy/configure_relay_proxy#log'}
98+
goModuleLink={'../go_module/data_collection/log'}
99+
/>
100+
},
101+
{
102+
logoImg: kinesislogo,
103+
title: "AWS Kinesis",
104+
content: <ConfigCardContent
105+
relayproxyLink={'../relay_proxy/configure_relay_proxy#aws-kinesis'}
106+
goModuleLink={'../go_module/data_collection/kinesis'}
107+
/>
108+
},
109+
{
110+
logoImg: customlogo,
111+
title: "Custom ...",
112+
content: <ConfigCardContent
113+
goModuleLink={'../go_module/data_collection/custom'}
114+
/>
115+
},
116+
]}/>

0 commit comments

Comments
 (0)