Skip to content

Commit 758b8e4

Browse files
Merge branch 'main' into update-relay-proxy-chart-readme
2 parents 6f9acaa + a8b233b commit 758b8e4

Some content is hidden

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

81 files changed

+5445
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"position": 0,
3+
"collapsible": true,
4+
"collapsed": false
5+
}
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+
}
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.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
sidebar_position: 40
3+
description: How to export evaluation data?
4+
---
5+
import {Cards} from '@site/src/components/doc/cardv2';
6+
import { ConfigCardContent } from "@site/src/components/doc/configCardContent";
7+
import customlogo from '@site/static/docs/collectors/custom.png';
8+
import filelogo from '@site/static/docs/collectors/file.png';
9+
import googlelogo from '@site/static/docs/collectors/google.png';
10+
import loglogo from '@site/static/docs/collectors/log.png';
11+
import s3logo from '@site/static/docs/collectors/s3.png';
12+
import webhooklogo from '@site/static/docs/collectors/webhook.png';
13+
import sqslogo from '@site/static/docs/collectors/sqs.png';
14+
import kafkalogo from '@site/static/docs/collectors/kafka.png';
15+
import pubsublogo from '@site/static/docs/collectors/pubsub.png';
16+
17+
18+
# How to export evaluation data
19+
GO Feature Flag allows for the collection of flag usage data.
20+
During flag evaluation, the key, flag variation and other non-sensitive information used are collected and cached for a
21+
configurable period of time.
22+
23+
The usage data is then written to a file in a chosen format (`parquet`, `JSON` or `CSV`) at a specified interval and
24+
exported to your desired location. This provides a single source for easy processing of the data. The feature can be
25+
configured with options for file format, flush interval, and file location.
26+
27+
To use, simply configure and use the feature flag as normal, and analyze the collected usage data.
28+
29+
## Available exporters
30+
<Cards cards={[
31+
{
32+
logoImg: s3logo,
33+
title:"AWS S3",
34+
content: <ConfigCardContent
35+
relayproxyLink={'../relay_proxy/configure_relay_proxy#s3-1'}
36+
goModuleLink={'../go_module/data_collection/s3'}
37+
/>
38+
},
39+
{
40+
logoImg: sqslogo,
41+
title:"AWS SQS",
42+
content: <ConfigCardContent
43+
relayproxyLink={'../relay_proxy/configure_relay_proxy#sqs'}
44+
goModuleLink={'../go_module/data_collection/sqs'}
45+
/>
46+
},
47+
{
48+
logoImg: kafkalogo,
49+
title:"Kafka",
50+
content: <ConfigCardContent
51+
relayproxyLink={'../relay_proxy/configure_relay_proxy#kafka'}
52+
goModuleLink={'../go_module/data_collection/kafka'}
53+
/>
54+
},
55+
{
56+
logoImg: googlelogo,
57+
title:"Google Storage",
58+
content: <ConfigCardContent
59+
relayproxyLink={'../relay_proxy/configure_relay_proxy#google-storage-1'}
60+
goModuleLink={'../go_module/data_collection/google_cloud_storage'}
61+
/>
62+
},
63+
{
64+
logoImg: pubsublogo,
65+
title:"Google PubSub",
66+
content: <ConfigCardContent
67+
relayproxyLink={'../relay_proxy/configure_relay_proxy#google-pubsub'}
68+
goModuleLink={'../go_module/data_collection/google_pubsub'}
69+
/>
70+
},
71+
{
72+
logoImg: webhooklogo,
73+
title:"Webhook",
74+
content: <ConfigCardContent
75+
relayproxyLink={'../relay_proxy/configure_relay_proxy#webhook'}
76+
goModuleLink={'../go_module/data_collection/webhook'}
77+
/>
78+
},
79+
{
80+
logoImg: filelogo,
81+
title:"Local File",
82+
content: <ConfigCardContent
83+
relayproxyLink={'../relay_proxy/configure_relay_proxy#file-1'}
84+
goModuleLink={'../go_module/data_collection/file'}
85+
/>
86+
},
87+
{
88+
logoImg: loglogo,
89+
title:"Webhook",
90+
content: <ConfigCardContent
91+
relayproxyLink={'../relay_proxy/configure_relay_proxy#log'}
92+
goModuleLink={'../go_module/data_collection/log'}
93+
/>
94+
},
95+
{
96+
logoImg: customlogo,
97+
title:"Custom ...",
98+
content: <ConfigCardContent
99+
goModuleLink={'../go_module/data_collection/custom'}
100+
/>
101+
},
102+
]} />

0 commit comments

Comments
 (0)