Flagsmith
Feature Flagging with Flagsmith
We use Flagsmith as our feature flagging tool to manage and toggle features across our applications dynamically. Feature flags allow us to enable or disable functionality remotely without deploying new code, facilitating testing and feature rollouts.
How to Use Flagsmith
When you log into Flagsmith, you will see different environments and flags that can be toggled on or off. Each flag is associated with a specific feature in our applications.
If you do not have access to Flagsmith, please contact Tom on Teams, or at tom@prismm.com to request access.
You can find out more about Flagsmith on their GitHub, linked here.
Terminology: Identity, Traits, and Segmentation
Identity:
A unique identifier (UUID) automatically generated when a user registers. It uniquely represents a user within the system, ensuring that all actions and feature flags are correctly associated with that specific user.Trait:
An attribute associated with an identity. Traits can be provided automatically (e.g.,usertype
andemail
) or added manually. They describe various characteristics of a user and are essential for determining user groupings.Segmentation:
The process of grouping users based on their traits. Segmentation enables targeted feature flag deployment by allowing specific groups (like development teams, QA, PMs, etc.) to receive tailored features. Rules for segmentation can be as simple as checking a single trait or as complex as applying regex and multiple attribute evaluations.
TL;DR:
- Identity: Unique user reference.
- Trait: Attributes defining user characteristics.
- Segmentation: Grouping mechanism for targeted feature flag management.
Auto-Identification
When a user registers, a unique identifier (UUID) is automatically generated via MSSQL. This UUID serves as your unique identity across our platform. You can verify your identity by querying the database and checking the uuid
column.
Segmentation and Traits
Segmentation is based on user traits. The client currently sends the following traits:
usertype
email
These traits are used to group users so that different groups (e.g., specific product development, QA, PM, etc.) receive the appropriate feature flags. In addition, traits can be manually added to create further segmentation, and segmentation rules can utilize regex and other complex checks for flexible grouping.
Adding Traits
After logging in at least once, you can get your UUID from the network (from getUserData
or login
network responses). If you need another user's UUID, you can query the database using their email address \ user id.
Follow these steps to manage identities and segmentation:
- Access the Flagsmith Dashboard:
Log in and navigate to the dashboard. - Locate Your Identity:
Find the identity record with the relevant UUID. - Update Traits:
Add or update the necessary traits to ensure you are added to the relevant segmentation groups. - Custom Segmentation (Optional):
If needed, create custom segmentations for your specific use case.