Skip to content

[FEATURE] Add Hooks to the global instance of OpenFeature using DI syntax #456

@askpt

Description

@askpt

Summary

This feature request aims to enhance the OpenFeature .NET SDK by enabling the addition of hooks to the global instance of OpenFeature using Dependency Injection (DI) syntax. This will align the SDK with common DI practices and improve its integration capabilities.

Additional Context:

As part of the DI library, the proposed implementation is expected to follow a syntax similar to the example below:

builder.Services.AddOpenFeature(openfeatureBuilder =>
{
    openfeatureBuilder.AddHostedFeatureLifecycle()
    .AddProvider(_ => new FlagdProvider())
    .AddHook(_ => new LoggingHook());
});

This addition allows developers to seamlessly configure the OpenFeature global instance and integrate hooks using fluent builder methods.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions