Skip to content

Commit 49fe05e

Browse files
chore: update sdk readmes
Signed-off-by: OpenFeature Bot <[email protected]>
1 parent 9be6404 commit 49fe05e

File tree

16 files changed

+182
-46
lines changed

16 files changed

+182
-46
lines changed

docs/reference/technologies/client/kotlin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This content has been automatically generated from kotlin-sdk.
1010
Edits should be made here: https://github.com/open-feature/kotlin-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Mon Oct 06 2025 08:10:45 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Thu Oct 23 2025 08:10:48 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">

docs/reference/technologies/client/swift.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This content has been automatically generated from swift-sdk.
1010
Edits should be made here: https://github.com/open-feature/swift-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Mon Oct 06 2025 08:10:45 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Thu Oct 23 2025 08:10:48 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">

docs/reference/technologies/client/web/angular.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ This content has been automatically generated from js-sdk.
1010
Edits should be made here: https://github.com/open-feature/js-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Mon Oct 06 2025 08:10:45 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Thu Oct 23 2025 08:10:49 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">
1717
<a href="https://github.com/open-feature/spec/releases/tag/v0.8.0">
1818
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge" />
1919
</a>
2020

21-
<a href="https://github.com/open-feature/js-sdk/releases/tag/angular-sdk-v0.0.17">
22-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.0.17&color=blue&style=for-the-badge" />
21+
<a href="https://github.com/open-feature/js-sdk/releases/tag/angular-sdk-v0.0.19">
22+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.0.19&color=blue&style=for-the-badge" />
2323
</a>
2424

2525
<br/>

docs/reference/technologies/client/web/index.mdx

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ This content has been automatically generated from js-sdk.
1010
Edits should be made here: https://github.com/open-feature/js-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Mon Oct 06 2025 08:10:45 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Thu Oct 23 2025 08:10:48 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">
1717
<a href="https://github.com/open-feature/spec/releases/tag/v0.8.0">
1818
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge" />
1919
</a>
2020

21-
<a href="https://github.com/open-feature/js-sdk/releases/tag/web-sdk-v1.6.2">
22-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.6.2&color=blue&style=for-the-badge" />
21+
<a href="https://github.com/open-feature/js-sdk/releases/tag/web-sdk-v1.7.0">
22+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.7.0&color=blue&style=for-the-badge" />
2323
</a>
2424

2525
<br/>
@@ -142,6 +142,63 @@ Once the provider has been registered, the status can be tracked using [events](
142142
In some situations, it may be beneficial to register multiple providers in the same application.
143143
This is possible using [domains](#domains), which is covered in more detail below.
144144

145+
#### Multi-Provider
146+
147+
The Multi-Provider allows you to use multiple underlying providers as sources of flag data for the OpenFeature web SDK. When a flag is being evaluated, the Multi-Provider will consult each underlying provider it is managing in order to determine the final result. Different evaluation strategies can be defined to control which providers get evaluated and which result is used.
148+
149+
The Multi-Provider is a powerful tool for performing migrations between flag providers, or combining multiple providers into a single feature flagging interface. For example:
150+
151+
- **Migration**: When migrating between two providers, you can run both in parallel under a unified flagging interface. As flags are added to the new provider, the Multi-Provider will automatically find and return them, falling back to the old provider if the new provider does not have the flag.
152+
- **Multiple Data Sources**: The Multi-Provider allows you to seamlessly combine many sources of flagging data, such as environment variables, local files, database values and SaaS hosted feature management systems.
153+
154+
```ts
155+
import { MultiProvider } from '@openfeature/web-sdk';
156+
157+
const multiProvider = new MultiProvider([
158+
{ provider: new ProviderA() },
159+
{ provider: new ProviderB() }
160+
]);
161+
162+
await OpenFeature.setProviderAndWait(multiProvider);
163+
164+
const client = OpenFeature.getClient();
165+
console.log(client.getBooleanDetails("my-flag", false));
166+
```
167+
168+
By default, the Multi-Provider will evaluate all underlying providers in order and return the first successful result. If a provider indicates it does not have a flag (FLAG_NOT_FOUND error code), then it will be skipped and the next provider will be evaluated.
169+
170+
##### Evaluation Strategies
171+
172+
The Multi-Provider comes with three strategies out of the box:
173+
174+
- **FirstMatchStrategy** (default): Evaluates all providers in order and returns the first successful result. Providers that indicate FLAG_NOT_FOUND error will be skipped and the next provider will be evaluated.
175+
- **FirstSuccessfulStrategy**: Evaluates all providers in order and returns the first successful result. Any error will cause that provider to be skipped.
176+
- **ComparisonStrategy**: Evaluates all providers sequentially. If every provider returns a successful result with the same value, then that result is returned. Otherwise, the result returned by the configured "fallback provider" will be used.
177+
178+
```ts
179+
import { MultiProvider, FirstSuccessfulStrategy } from '@openfeature/web-sdk';
180+
181+
const multiProvider = new MultiProvider(
182+
[
183+
{ provider: new ProviderA() },
184+
{ provider: new ProviderB() }
185+
],
186+
new FirstSuccessfulStrategy()
187+
);
188+
```
189+
190+
##### Tracking Support
191+
192+
The Multi-Provider supports tracking events across multiple providers, allowing you to send analytics events to all configured providers simultaneously:
193+
194+
```ts
195+
// Tracked events will be sent to all providers by default
196+
client.track('user-conversion', {
197+
value: 99.99,
198+
currency: 'USD'
199+
});
200+
```
201+
145202
### Flag evaluation flow
146203

147204
When a new provider is added to OpenFeature client the following process happens:

docs/reference/technologies/client/web/react.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This content has been automatically generated from js-sdk.
1010
Edits should be made here: https://github.com/open-feature/js-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Mon Oct 06 2025 08:10:45 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Thu Oct 23 2025 08:10:48 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">

docs/reference/technologies/server/dart.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This content has been automatically generated from dart-server-sdk.
99
Edits should be made here: https://github.com/open-feature/dart-server-sdk
1010
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1111

12-
Last updated at Mon Oct 06 2025 08:10:45 GMT+0000 (Coordinated Universal Time)
12+
Last updated at Thu Oct 23 2025 08:10:49 GMT+0000 (Coordinated Universal Time)
1313
-->
1414

1515
<p align="center" class="github-badges">

docs/reference/technologies/server/dotnet.mdx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ This content has been automatically generated from dotnet-sdk.
1010
Edits should be made here: https://github.com/open-feature/dotnet-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Mon Oct 06 2025 08:10:45 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Thu Oct 23 2025 08:10:48 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
[![Specification](https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge)](https://github.com/open-feature/spec/releases/tag/v0.8.0)
1717
[
18-
![Release](https://img.shields.io/static/v1?label=release&message=v2.8.1&color=blue&style=for-the-badge)
19-
](https://github.com/open-feature/dotnet-sdk/releases/tag/v2.8.1)
18+
![Release](https://img.shields.io/static/v1?label=release&message=v2.9.0&color=blue&style=for-the-badge)
19+
](https://github.com/open-feature/dotnet-sdk/releases/tag/v2.9.0)
2020

2121
[![Slack](https://img.shields.io/badge/slack-%40cncf%2Fopenfeature-brightgreen?style=flat&logo=slack)](https://cloud-native.slack.com/archives/C0344AANLA1)
2222
[![Codecov](https://codecov.io/gh/open-feature/dotnet-sdk/branch/main/graph/badge.svg?token=MONAVJBXUJ)](https://codecov.io/gh/open-feature/dotnet-sdk)
@@ -442,10 +442,12 @@ Built a new hook? [Let us know](https://github.com/open-feature/openfeature.dev/
442442
### Multi-Provider
443443

444444
> [!NOTE]
445-
> The Multi-Provider feature is currently experimental. Hooks and events are not supported at the moment.
445+
> The Multi-Provider feature is currently experimental.
446446
447447
The Multi-Provider enables the use of multiple underlying feature flag providers simultaneously, allowing different providers to be used for different flag keys or based on specific evaluation strategies.
448448

449+
The Multi-Provider supports provider hooks and executes them in accordance with the OpenFeature specification. Each provider's hooks are executed with context isolation, ensuring that context modifications by one provider's hooks do not affect other providers.
450+
449451
#### Basic Usage
450452

451453
```csharp
@@ -523,23 +525,20 @@ The Multi-Provider supports two evaluation modes:
523525

524526
#### Limitations
525527

526-
- **Hooks are not supported**: Multi-Provider does not currently support hook registration or execution
527-
- **Events are not supported**: Provider events are not propagated from underlying providers
528-
- **Experimental status**: The API may change in future releases
528+
- **Experimental status**: The API may change in future releases
529529

530530
For a complete example, see the [AspNetCore sample](https://github.com/open-feature/dotnet-sdk/blob/main/samples/AspNetCore/README.md) which demonstrates Multi-Provider usage.
531531

532532
### Dependency Injection
533533

534534
> [!NOTE]
535-
> The OpenFeature.DependencyInjection and OpenFeature.Hosting packages are currently experimental. They streamline the integration of OpenFeature within .NET applications, allowing for seamless configuration and lifecycle management of feature flag providers using dependency injection and hosting services.
535+
> The OpenFeature.Hosting package is currently experimental. The Hosting package streamlines the integration of OpenFeature within .NET applications, allowing for seamless configuration and lifecycle management of feature flag providers using dependency injection and hosting services.
536536
537537
#### Installation
538538

539-
To set up dependency injection and hosting capabilities for OpenFeature, install the following packages:
539+
To set up dependency injection and hosting capabilities for OpenFeature, install the following package:
540540

541541
```sh
542-
dotnet add package OpenFeature.DependencyInjection
543542
dotnet add package OpenFeature.Hosting
544543
```
545544

@@ -552,7 +551,6 @@ For a basic configuration, you can use the InMemoryProvider. This provider is si
552551
```csharp
553552
builder.Services.AddOpenFeature(featureBuilder => {
554553
featureBuilder
555-
.AddHostedFeatureLifecycle() // From Hosting package
556554
.AddInMemoryProvider();
557555
});
558556
```
@@ -574,7 +572,6 @@ builder.Services.AddOpenFeature(featureBuilder => {
574572
```csharp
575573
builder.Services.AddOpenFeature(featureBuilder => {
576574
featureBuilder
577-
.AddHostedFeatureLifecycle()
578575
.AddContext((contextBuilder, serviceProvider) => { /* Custom context configuration */ })
579576
.AddHook((serviceProvider) => new LoggingHook( /* Custom configuration */ ))
580577
.AddHook(new MetricsHook())

docs/reference/technologies/server/go.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This content has been automatically generated from go-sdk.
99
Edits should be made here: https://github.com/open-feature/go-sdk
1010
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1111

12-
Last updated at Mon Oct 06 2025 08:10:45 GMT+0000 (Coordinated Universal Time)
12+
Last updated at Thu Oct 23 2025 08:10:48 GMT+0000 (Coordinated Universal Time)
1313
-->
1414

1515
<p align="center" class="github-badges">
@@ -114,7 +114,8 @@ openfeature.SetProviderAndWait(MyProvider{})
114114
```
115115

116116
In some situations, it may be beneficial to register multiple providers in the same application.
117-
This is possible using [domains](#domains), which is covered in more details below.
117+
This is possible using [domains](#domains), which is covered in more details below, or the included [multiprovider](#multi-provider-implementation)
118+
implementation.
118119

119120
### Targeting
120121

@@ -326,6 +327,11 @@ tCtx := openfeature.MergeTransactionContext(ctx, openfeature.EvaluationContext{}
326327
client.BooleanValue(tCtx, ....)
327328
```
328329

330+
### Multi-Provider Implementation
331+
332+
Included with this SDK is an _experimental_ multi-provider that can be used to query multiple feature flag providers simultaneously.
333+
More information can be found in the [multi package's README](https://github.com/open-feature/go-sdk/blob/main/openfeature/multi/README.md).
334+
329335
## Extending
330336

331337
### Develop a provider

docs/reference/technologies/server/java.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This content has been automatically generated from java-sdk.
99
Edits should be made here: https://github.com/open-feature/java-sdk
1010
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1111

12-
Last updated at Mon Oct 06 2025 08:10:44 GMT+0000 (Coordinated Universal Time)
12+
Last updated at Thu Oct 23 2025 08:10:47 GMT+0000 (Coordinated Universal Time)
1313
-->
1414

1515
<p align="center" class="github-badges">
@@ -18,8 +18,8 @@ Last updated at Mon Oct 06 2025 08:10:44 GMT+0000 (Coordinated Universal Time)
1818
</a>
1919

2020

21-
<a href="https://github.com/open-feature/java-sdk/releases/tag/v1.18.1">
22-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.18.1&color=blue&style=for-the-badge" />
21+
<a href="https://github.com/open-feature/java-sdk/releases/tag/v1.18.2">
22+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.18.2&color=blue&style=for-the-badge" />
2323
</a>
2424

2525

@@ -54,7 +54,7 @@ Note that this library is intended to be used in server-side contexts and has no
5454
<dependency>
5555
<groupId>dev.openfeature</groupId>
5656
<artifactId>sdk</artifactId>
57-
<version>1.18.1</version>
57+
<version>1.18.2</version>
5858
</dependency>
5959
```
6060

@@ -77,7 +77,7 @@ If you would like snapshot builds, this is the relevant repository information:
7777

7878
```groovy
7979
dependencies {
80-
implementation 'dev.openfeature:sdk:1.18.1'
80+
implementation 'dev.openfeature:sdk:1.18.2'
8181
}
8282
```
8383

docs/reference/technologies/server/javascript/index.mdx

Lines changed: 80 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ This content has been automatically generated from js-sdk.
1010
Edits should be made here: https://github.com/open-feature/js-sdk
1111
Once a repo has been updated, docs can be generated by running: yarn update:sdk-docs
1212

13-
Last updated at Mon Oct 06 2025 08:10:44 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Thu Oct 23 2025 08:10:47 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">
1717
<a href="https://github.com/open-feature/spec/releases/tag/v0.8.0">
1818
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge" />
1919
</a>
2020

21-
<a href="https://github.com/open-feature/js-sdk/releases/tag/server-sdk-v1.19.0">
22-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.19.0&color=blue&style=for-the-badge" />
21+
<a href="https://github.com/open-feature/js-sdk/releases/tag/server-sdk-v1.20.0">
22+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.20.0&color=blue&style=for-the-badge" />
2323
</a>
2424

2525
<br/>
@@ -137,7 +137,83 @@ OpenFeature.setProvider(new MyProvider());
137137
Once the provider has been registered, the status can be tracked using [events](#eventing).
138138

139139
In some situations, it may be beneficial to register multiple providers in the same application.
140-
This is possible using [domains](#domains), which is covered in more details below.
140+
This is possible using [domains](#domains), which is covered in more detail below.
141+
142+
#### Multi-Provider
143+
144+
The Multi-Provider allows you to use multiple underlying providers as sources of flag data for the OpenFeature server SDK. When a flag is being evaluated, the Multi-Provider will consult each underlying provider it is managing in order to determine the final result. Different evaluation strategies can be defined to control which providers get evaluated and which result is used.
145+
146+
The Multi-Provider is a powerful tool for performing migrations between flag providers, or combining multiple providers into a single feature flagging interface. For example:
147+
148+
- **Migration**: Gradually migrate from one provider to another by serving some flags from your old provider and some from your new provider
149+
- **Backup**: Use one provider as a backup for another in case of failures
150+
- **Comparison**: Compare results from multiple providers to validate consistency
151+
- **Hybrid**: Combine multiple providers to leverage different strengths (e.g., one for simple flags, another for complex targeting)
152+
153+
```ts
154+
import { OpenFeature, MultiProvider, FirstMatchStrategy } from '@openfeature/server-sdk';
155+
156+
// Create providers
157+
const primaryProvider = new YourPrimaryProvider();
158+
const backupProvider = new YourBackupProvider();
159+
160+
// Create multi-provider with a strategy
161+
const multiProvider = new MultiProvider(
162+
[primaryProvider, backupProvider],
163+
new FirstMatchStrategy()
164+
);
165+
166+
// Register the multi-provider
167+
await OpenFeature.setProviderAndWait(multiProvider);
168+
169+
// Use as normal
170+
const client = OpenFeature.getClient();
171+
const value = await client.getBooleanValue('my-flag', false);
172+
```
173+
174+
**Available Strategies:**
175+
176+
- `FirstMatchStrategy`: Returns the first successful result from the list of providers
177+
- `ComparisonStrategy`: Compares results from multiple providers and can handle discrepancies
178+
179+
**Migration Example:**
180+
181+
```ts
182+
import { OpenFeature, MultiProvider, FirstMatchStrategy } from '@openfeature/server-sdk';
183+
184+
// During migration, serve some flags from the new provider and fallback to the old one
185+
const newProvider = new NewFlagProvider();
186+
const oldProvider = new OldFlagProvider();
187+
188+
const multiProvider = new MultiProvider(
189+
[newProvider, oldProvider], // New provider is consulted first
190+
new FirstMatchStrategy()
191+
);
192+
193+
await OpenFeature.setProviderAndWait(multiProvider);
194+
```
195+
196+
**Comparison Example:**
197+
198+
```ts
199+
import { OpenFeature, MultiProvider, ComparisonStrategy } from '@openfeature/server-sdk';
200+
201+
// Compare results from two providers for validation
202+
const providerA = new ProviderA();
203+
const providerB = new ProviderB();
204+
205+
const multiProvider = new MultiProvider(
206+
[
207+
{ provider: providerA },
208+
{ provider: providerB }
209+
],
210+
new ComparisonStrategy(providerA, (resolutions) => {
211+
console.warn('Mismatch detected', resolutions);
212+
})
213+
);
214+
215+
await OpenFeature.setProviderAndWait(multiProvider);
216+
```
141217

142218
### Targeting
143219

0 commit comments

Comments
 (0)