Providers
Flag Controller's feature flag evaluation is powered by flagd, an OpenFeature-compliant evaluation engine. To evaluate flags in your application, choose the OpenFeature Provider that matches your programming language or framework.
Finding a Provider
Browse the OpenFeature ecosystem to find the Provider for your language or framework. OpenFeature Providers are available for many platforms including JavaScript/TypeScript, Java, Go, Python, .NET, and more.
Configuring Your Provider
When configuring your chosen Provider, you will need two things:
- Base URL or host: The URL of your Flag Controller flagd instance
- Flag Set ID: A value that scopes flag evaluation to your application and environment
Flag Set ID
The Flag Set ID follows the convention applicationName-environment, where:
applicationNameis your application's nameenvironmentis eitherproductionordevelopment
Example: An application named my-app targeting production uses the Flag Set ID my-app-production.
When using the OFREP endpoint, pass the Flag Set ID as an HTTP header. When using the flagd gRPC protocol, pass it as metadata.
- OFREP
- flagd
import { OFREPProvider } from '@openfeature/ofrep-provider';
import { OpenFeature } from '@openfeature/server-sdk';
await OpenFeature.setProviderAndWait(
new OFREPProvider({
baseUrl: 'http://your-flagd-instance:8016',
headers: [['flagSetId', 'my-app-production']],
})
);
import { FlagdProvider } from '@openfeature/flagd-provider';
import { OpenFeature } from '@openfeature/server-sdk';
await OpenFeature.setProviderAndWait(
new FlagdProvider({
host: 'your-flagd-instance',
port: 8013,
metadata: {
flagSetId: 'my-app-production',
},
})
);
For more information on OpenFeature Providers and their configuration options, see the OpenFeature documentation.