diff --git a/docs/reference/technologies/client/kotlin.mdx b/docs/reference/technologies/client/kotlin.mdx index 0635526f..7a1368e5 100644 --- a/docs/reference/technologies/client/kotlin.mdx +++ b/docs/reference/technologies/client/kotlin.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from kotlin-sdk. Edits should be made here: https://github.com/open-feature/kotlin-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Dec 06 2024 08:09:57 GMT+0000 (Coordinated Universal Time) +Last updated at Mon Dec 09 2024 08:10:34 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/client/swift.mdx b/docs/reference/technologies/client/swift.mdx index ed47e9dd..d99981c3 100644 --- a/docs/reference/technologies/client/swift.mdx +++ b/docs/reference/technologies/client/swift.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from swift-sdk. Edits should be made here: https://github.com/open-feature/swift-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Dec 06 2024 08:09:58 GMT+0000 (Coordinated Universal Time) +Last updated at Mon Dec 09 2024 08:10:34 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/client/web/angular.mdx b/docs/reference/technologies/client/web/angular.mdx index 1801f52e..edfe81cc 100644 --- a/docs/reference/technologies/client/web/angular.mdx +++ b/docs/reference/technologies/client/web/angular.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk. Edits should be made here: https://github.com/open-feature/js-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Dec 06 2024 08:09:58 GMT+0000 (Coordinated Universal Time) +Last updated at Mon Dec 09 2024 08:10:35 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/client/web/index.mdx b/docs/reference/technologies/client/web/index.mdx index 81fdc2a9..cf56662c 100644 --- a/docs/reference/technologies/client/web/index.mdx +++ b/docs/reference/technologies/client/web/index.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk. Edits should be made here: https://github.com/open-feature/js-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Dec 06 2024 08:09:57 GMT+0000 (Coordinated Universal Time) +Last updated at Mon Dec 09 2024 08:10:34 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/client/web/react.mdx b/docs/reference/technologies/client/web/react.mdx index 1b76828e..31e0b703 100644 --- a/docs/reference/technologies/client/web/react.mdx +++ b/docs/reference/technologies/client/web/react.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk. Edits should be made here: https://github.com/open-feature/js-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Dec 06 2024 08:09:57 GMT+0000 (Coordinated Universal Time) +Last updated at Mon Dec 09 2024 08:10:34 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/server/dotnet.mdx b/docs/reference/technologies/server/dotnet.mdx index 108427a9..f3efaca6 100644 --- a/docs/reference/technologies/server/dotnet.mdx +++ b/docs/reference/technologies/server/dotnet.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from dotnet-sdk. Edits should be made here: https://github.com/open-feature/dotnet-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Dec 06 2024 08:09:57 GMT+0000 (Coordinated Universal Time) +Last updated at Mon Dec 09 2024 08:10:33 GMT+0000 (Coordinated Universal Time) --> [![Specification](https://img.shields.io/static/v1?label=specification&message=v0.7.0&color=yellow&style=for-the-badge)](https://github.com/open-feature/spec/releases/tag/v0.7.0) @@ -339,40 +339,42 @@ builder.Services.AddOpenFeature(featureBuilder => { }); }); ``` -#### Creating a New Provider -To integrate a custom provider, such as InMemoryProvider, you’ll need to create a factory that builds and configures the provider. This section demonstrates how to set up InMemoryProvider as a new provider with custom configuration options. -**Configuring InMemoryProvider as a New Provider** -
Begin by creating a custom factory class, `InMemoryProviderFactory`, that implements `IFeatureProviderFactory`. This factory will initialize your provider with any necessary configurations. -```csharp -public class InMemoryProviderFactory : IFeatureProviderFactory -{ - internal IDictionary? Flags { get; set; } - - public FeatureProvider Create() => new InMemoryProvider(Flags); -} -``` -**Adding an Extension Method to OpenFeatureBuilder** -
To streamline the configuration process, add an extension method, `AddInMemoryProvider`, to `OpenFeatureBuilder`. This allows you to set up the provider with either a domain-scoped or a default configuration. +### Registering a Custom Provider +You can register a custom provider, such as `InMemoryProvider`, with OpenFeature using the `AddProvider` method. This approach allows you to dynamically resolve services or configurations during registration. ```csharp -public static partial class FeatureBuilderExtensions -{ - public static OpenFeatureBuilder AddInMemoryProvider(this OpenFeatureBuilder builder, Action>? configure = null) - => builder.AddProvider(factory => ConfigureFlags(factory, configure)); +services.AddOpenFeature() + .AddProvider(provider => + { + // Resolve services or configurations as needed + var configuration = provider.GetRequiredService(); + var flags = new Dictionary + { + { "feature-key", new Flag(configuration.GetValue("FeatureFlags:Key")) } + }; + + // Register a custom provider, such as InMemoryProvider + return new InMemoryProvider(flags); + }); +``` - public static OpenFeatureBuilder AddInMemoryProvider(this OpenFeatureBuilder builder, string domain, Action>? configure = null) - => builder.AddProvider(domain, factory => ConfigureFlags(factory, configure)); +#### Adding a Domain-Scoped Provider - private static void ConfigureFlags(InMemoryProviderFactory factory, Action>? configure) - { - if (configure == null) - return; +You can also register a domain-scoped custom provider, enabling configurations specific to each domain: - var flag = new Dictionary(); - configure.Invoke(flag); - factory.Flags = flag; - } -} +```csharp +services.AddOpenFeature() + .AddProvider("my-domain", (provider, domain) => + { + // Resolve services or configurations as needed for the domain + var flags = new Dictionary + { + { $"{domain}-feature-key", new Flag(true) } + }; + + // Register a domain-scoped custom provider such as InMemoryProvider + return new InMemoryProvider(flags); + }); ``` diff --git a/docs/reference/technologies/server/go.mdx b/docs/reference/technologies/server/go.mdx index 31918e7a..2800d573 100644 --- a/docs/reference/technologies/server/go.mdx +++ b/docs/reference/technologies/server/go.mdx @@ -9,7 +9,7 @@ This content has been automatically generated from go-sdk. Edits should be made here: https://github.com/open-feature/go-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Dec 06 2024 08:09:57 GMT+0000 (Coordinated Universal Time) +Last updated at Mon Dec 09 2024 08:10:33 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/server/java.mdx b/docs/reference/technologies/server/java.mdx index ca1a2605..c4a24914 100644 --- a/docs/reference/technologies/server/java.mdx +++ b/docs/reference/technologies/server/java.mdx @@ -9,7 +9,7 @@ This content has been automatically generated from java-sdk. Edits should be made here: https://github.com/open-feature/java-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Dec 06 2024 08:09:57 GMT+0000 (Coordinated Universal Time) +Last updated at Mon Dec 09 2024 08:10:33 GMT+0000 (Coordinated Universal Time) -->

@@ -112,17 +112,18 @@ See [here](https://javadoc.io/doc/dev.openfeature/sdk/latest/) for the Javadocs. ## Features -| Status | Features | Description | -| ------ |-----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| -| ✅ | [Providers](#providers) | Integrate with a commercial, open source, or in-house feature management tool. | -| ✅ | [Targeting](#targeting) | Contextually-aware flag evaluation using [evaluation context](/docs/reference/concepts/evaluation-context). | -| ✅ | [Hooks](#hooks) | Add functionality to various stages of the flag evaluation life-cycle. | -| ✅ | [Logging](#logging) | Integrate with popular logging packages. | -| ✅ | [Domains](#domains) | Logically bind clients with providers. | -| ✅ | [Eventing](#eventing) | React to state changes in the provider or flag management system. | -| ✅ | [Shutdown](#shutdown) | Gracefully clean up a provider during application shutdown. | -| ✅ | [Transaction Context Propagation](#transaction-context-propagation) | Set a specific [evaluation context](/docs/reference/concepts/evaluation-context) for a transaction (e.g. an HTTP request or a thread). | -| ✅ | [Extending](#extending) | Extend OpenFeature with custom providers and hooks. | +| Status | Features | Description | +| ------ |---------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| +| ✅ | [Providers](#providers) | Integrate with a commercial, open source, or in-house feature management tool. | +| ✅ | [Targeting](#targeting) | Contextually-aware flag evaluation using [evaluation context](/docs/reference/concepts/evaluation-context). | +| ✅ | [Hooks](#hooks) | Add functionality to various stages of the flag evaluation life-cycle. | +| ✅ | [Tracking](#tracking) | Associate user actions with feature flag evaluations. | +| ✅ | [Logging](#logging) | Integrate with popular logging packages. | +| ✅ | [Domains](#domains) | Logically bind clients with providers. | +| ✅ | [Eventing](#eventing) | React to state changes in the provider or flag management system. | +| ✅ | [Shutdown](#shutdown) | Gracefully clean up a provider during application shutdown. | +| ✅ | [Transaction Context Propagation](#transaction-context-propagation) | Set a specific [evaluation context](/docs/reference/concepts/evaluation-context) for a transaction (e.g. an HTTP request or a thread). | +| ✅ | [Extending](#extending) | Extend OpenFeature with custom providers and hooks. | Implemented: ✅ | In-progress: ⚠️ | Not implemented yet: ❌ @@ -207,6 +208,16 @@ Once you've added a hook as a dependency, it can be registered at the global, cl FlagEvaluationOptions.builder().hook(new ExampleHook()).build()); ``` +### Tracking + +The [tracking API](/specification/sections/tracking/) allows you to use OpenFeature abstractions to associate user actions with feature flag evaluations. +This is essential for robust experimentation powered by feature flags. Note that, unlike methods that handle feature flag evaluations, calling `track(...)` may throw an `IllegalArgumentException` if an empty string is passed as the `trackingEventName`. + +```java +OpenFeatureAPI api = OpenFeatureAPI.getInstance(); +api.getClient().track("visited-promo-page", new MutableTrackingEventDetails(99.77).add("currency", "USD")); +``` + ### Logging The Java SDK uses SLF4J. See the [SLF4J manual](https://slf4j.org/manual.html) for complete documentation. diff --git a/docs/reference/technologies/server/javascript/index.mdx b/docs/reference/technologies/server/javascript/index.mdx index e9c22386..4ea098e4 100644 --- a/docs/reference/technologies/server/javascript/index.mdx +++ b/docs/reference/technologies/server/javascript/index.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk. Edits should be made here: https://github.com/open-feature/js-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Dec 06 2024 08:09:57 GMT+0000 (Coordinated Universal Time) +Last updated at Mon Dec 09 2024 08:10:33 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/server/javascript/nestjs.mdx b/docs/reference/technologies/server/javascript/nestjs.mdx index a6b0eef9..c62db6bc 100644 --- a/docs/reference/technologies/server/javascript/nestjs.mdx +++ b/docs/reference/technologies/server/javascript/nestjs.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk. Edits should be made here: https://github.com/open-feature/js-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Dec 06 2024 08:09:57 GMT+0000 (Coordinated Universal Time) +Last updated at Mon Dec 09 2024 08:10:33 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/server/php.mdx b/docs/reference/technologies/server/php.mdx index af10331b..57a4d62f 100644 --- a/docs/reference/technologies/server/php.mdx +++ b/docs/reference/technologies/server/php.mdx @@ -9,7 +9,7 @@ This content has been automatically generated from php-sdk. Edits should be made here: https://github.com/open-feature/php-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Dec 06 2024 08:09:57 GMT+0000 (Coordinated Universal Time) +Last updated at Mon Dec 09 2024 08:10:34 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/server/python.mdx b/docs/reference/technologies/server/python.mdx index 403faece..d162ac2a 100644 --- a/docs/reference/technologies/server/python.mdx +++ b/docs/reference/technologies/server/python.mdx @@ -9,7 +9,7 @@ This content has been automatically generated from python-sdk. Edits should be made here: https://github.com/open-feature/python-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Dec 06 2024 08:09:57 GMT+0000 (Coordinated Universal Time) +Last updated at Mon Dec 09 2024 08:10:34 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/server/ruby.mdx b/docs/reference/technologies/server/ruby.mdx index 22e2ca21..140bfad3 100644 --- a/docs/reference/technologies/server/ruby.mdx +++ b/docs/reference/technologies/server/ruby.mdx @@ -10,7 +10,7 @@ This content has been automatically generated from ruby-sdk. Edits should be made here: https://github.com/open-feature/ruby-sdk Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs -Last updated at Fri Dec 06 2024 08:09:58 GMT+0000 (Coordinated Universal Time) +Last updated at Mon Dec 09 2024 08:10:34 GMT+0000 (Coordinated Universal Time) -->

diff --git a/src/datasets/sdks/sdk-compatibility.json b/src/datasets/sdks/sdk-compatibility.json index 754ddd8b..95b090f3 100644 --- a/src/datasets/sdks/sdk-compatibility.json +++ b/src/datasets/sdks/sdk-compatibility.json @@ -38,8 +38,8 @@ "path": "/docs/reference/technologies/server/java#eventing" }, "Tracking": { - "status": "❓", - "path": "/docs/reference/technologies/server/java" + "status": "✅", + "path": "/docs/reference/technologies/server/java#tracking" }, "Transaction Context Propagation": { "status": "✅",