Skip to content

[FEATURE] Add Events to the global instance of OpenFeature using DI syntax #457

@askpt

Description

@askpt

Summary

This feature request aims to enhance the OpenFeature .NET SDK by enabling the addition of event handlers 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())
    .AddEventHandler(_ => new OpenFeatureEventHandler());
});

This addition allows developers to seamlessly configure the OpenFeature global instance and integrate event handlers using fluent builder methods.
Check https://openfeature.dev/docs/reference/concepts/events/#event-handlers for more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions