Skip to content

Add integration for OpenFeature/Flagd #737

@aj-patterson72

Description

@aj-patterson72

.NET Aspire issue link

No response

Overview

OpenFeature is an open specification for feature flag APIs and providers.

It offers a sub-project called flagd as a default provider.

Integrating this tooling helps developers implement feature flags and control them in their local development environment while reusing feature flag definitions from their live environments.

Usage example

// Hosting
var flagd = builder.AddOpenFeature("openfeature")
    .AddFlagdProvider("flagd")
flagd.AddFile("flags.json");
flagd.AddAzureBlob("https://mystorage.blob.core.windows.net/blobs/flags.json")
flagd.WithOverride(/* Parameter */);

// Client
builder.AddOpenFeature();

public class ExampleService(IFeatureClient featureClient)
{
}

Additional context

Given OpenFeature is a client-side SDK, it may make more sense to instead define the interface as simply adding Flagd on the hosting side and instead providing a builder.AddFlagdProvider() method in the client which can be used by the existing OpenFeature SDK. However, the presence of Flagd implies the usage of OpenFeature, so it's a bit awkward to ask the user to do some of the setup on their own with OpenFeature.

Help us help you

Yes, I'd like to be assigned to work on this item

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions