Flagsmith / Flagsmith/flagsmith

Add context to evaluated flags to describe reason for value (e.g. segment, identity, environment)

Open
#5,181 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.6k
Forks
567
Avg merge
1d 13h
Merged PRs (30d)
121

Description

### Is your feature request related to a problem? Please describe.

Conducting A/B testing and some other custom logic on top of Features provided by Flagsmith SDK, it is required to have Feature Metadata along side the feature list and evaluation results.

**Scenario 1**: Conducting A/B testing, we would like to be able to realize what is the reason where Identity is assigned to group A or B or None (not participated in the test). For example, setting an A/B test for all the users with custom segmentation, where PropA=X and PropB=Y, how can we tell what is the reason for a given Identity, being assigned to group A, B or neither? (for example, PropA is not X or PropB is not Y).

**Scenario 2**: Conducting A/B testing, we would like to be able to run some custom logic which sends the results to Big Query for example. As we don't want to run this logic per-each feature, only for those who were marked with "A/B" feature Tag, from the Dashboard, the SDK don't provide back these essential Tag information.
There are many other cases where one would like to filter-in/out features based on this info.

Providing back the segmentation information, tags and other Metadata is possible using the REST APIs. But since the SDK already Poll for this info, why not exposing it as public APIs?
While using the REST API is possible, the Feature state provided by the SDK won't be in Sync with the direct calls to the REST API and there will always be redundant calls to the API service.

### Describe the solution you'd like.

Expose Feature metadata, such as Segmentation rules and Tags from the SDK.

### Describe alternatives you've considered

None

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.