Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(docusaurus): Create a new documentation version v1.34.2 #2374

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions website/versioned_docs/version-v1.34.2/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"position": 0,
"collapsible": true,
"collapsed": false
}
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"
}
}
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
sidebar_position: 40
description: How to export evaluation data?
---
import {Cards} from '@site/src/components/doc/cardv2';
import { ConfigCardContent } from "@site/src/components/doc/configCardContent";
import customlogo from '@site/static/docs/collectors/custom.png';
import filelogo from '@site/static/docs/collectors/file.png';
import googlelogo from '@site/static/docs/collectors/google.png';
import loglogo from '@site/static/docs/collectors/log.png';
import s3logo from '@site/static/docs/collectors/s3.png';
import webhooklogo from '@site/static/docs/collectors/webhook.png';
import sqslogo from '@site/static/docs/collectors/sqs.png';
import kafkalogo from '@site/static/docs/collectors/kafka.png';
import pubsublogo from '@site/static/docs/collectors/pubsub.png';


# How to export evaluation data
GO Feature Flag allows for the collection of flag usage data.
During flag evaluation, the key, flag variation and other non-sensitive information used are collected and cached for a
configurable period of time.

The usage data is then written to a file in a chosen format (`parquet`, `JSON` or `CSV`) at a specified interval and
exported to your desired location. This provides a single source for easy processing of the data. The feature can be
configured with options for file format, flush interval, and file location.

To use, simply configure and use the feature flag as normal, and analyze the collected usage data.

## Available exporters
<Cards cards={[
{
logoImg: s3logo,
title:"AWS S3",
content: <ConfigCardContent
relayproxyLink={'../relay_proxy/configure_relay_proxy#s3-1'}
goModuleLink={'../go_module/data_collection/s3'}
/>
},
{
logoImg: sqslogo,
title:"AWS SQS",
content: <ConfigCardContent
relayproxyLink={'../relay_proxy/configure_relay_proxy#sqs'}
goModuleLink={'../go_module/data_collection/sqs'}
/>
},
{
logoImg: kafkalogo,
title:"Kafka",
content: <ConfigCardContent
relayproxyLink={'../relay_proxy/configure_relay_proxy#kafka'}
goModuleLink={'../go_module/data_collection/kafka'}
/>
},
{
logoImg: googlelogo,
title:"Google Storage",
content: <ConfigCardContent
relayproxyLink={'../relay_proxy/configure_relay_proxy#google-storage-1'}
goModuleLink={'../go_module/data_collection/google_cloud_storage'}
/>
},
{
logoImg: pubsublogo,
title:"Google PubSub",
content: <ConfigCardContent
relayproxyLink={'../relay_proxy/configure_relay_proxy#google-pubsub'}
goModuleLink={'../go_module/data_collection/google_pubsub'}
/>
},
{
logoImg: webhooklogo,
title:"Webhook",
content: <ConfigCardContent
relayproxyLink={'../relay_proxy/configure_relay_proxy#webhook'}
goModuleLink={'../go_module/data_collection/webhook'}
/>
},
{
logoImg: filelogo,
title:"Local File",
content: <ConfigCardContent
relayproxyLink={'../relay_proxy/configure_relay_proxy#file-1'}
goModuleLink={'../go_module/data_collection/file'}
/>
},
{
logoImg: loglogo,
title:"Webhook",
content: <ConfigCardContent
relayproxyLink={'../relay_proxy/configure_relay_proxy#log'}
goModuleLink={'../go_module/data_collection/log'}
/>
},
{
logoImg: customlogo,
title:"Custom ...",
content: <ConfigCardContent
goModuleLink={'../go_module/data_collection/custom'}
/>
},
]} />
Loading
Loading