Skip to content

Commit 3b44b92

Browse files
chore: update sdk readmes
Signed-off-by: OpenFeature Bot <[email protected]>
1 parent a97547f commit 3b44b92

File tree

14 files changed

+213
-49
lines changed

14 files changed

+213
-49
lines changed

docs/reference/technologies/client/kotlin.mdx

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ 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 Wed Jul 16 2025 08:11:01 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Tue Aug 19 2025 08:10:36 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/kotlin-sdk/releases/tag/v0.4.1">
22-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.4.1&color=blue&style=for-the-badge" />
21+
<a href="https://github.com/open-feature/kotlin-sdk/releases/tag/v0.6.2">
22+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.6.2&color=blue&style=for-the-badge" />
2323
</a>
2424

2525
<br/>
@@ -33,26 +33,63 @@ Last updated at Wed Jul 16 2025 08:11:01 GMT+0000 (Coordinated Universal Time)
3333

3434
### Requirements
3535

36-
- The Android minSdk version supported is: `21`.
36+
The following [Kotlin Multiplatform Targets](https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-dsl-reference.html#targets) are supported:
3737

38-
Note that this library is intended to be used in a mobile context, and has not been evaluated for use in other types of applications (e.g. server applications).
38+
| Supported | Platform | Supported versions |
39+
|-----------|----------------------|--------------------------------------------------------------------------------|
40+
|| Android | SDK 21+ |
41+
|| JVM | JDK 11+ |
42+
|| Native | Linux x64 |
43+
|| Native | [Other native targets](https://kotlinlang.org/docs/native-target-support.html) |
44+
|| Javascript (Node.js) | |
45+
|| Javascript (Browser) | |
46+
|| Wasm | |
3947

40-
### Install
48+
Note that this library adheres to the
49+
[Static Context Paradigm](/docs/reference/concepts/sdk-paradigms), so it is
50+
intended to be used on the **client side** (i.e. mobile apps, web apps and desktop apps), and has
51+
not been evaluated for use in other types of applications (e.g. server applications).
4152

42-
#### Maven Central
53+
### Installation
4354

44-
Installation via Maven Central is preferred, using the following dependency:
55+
Installation is preferred via Maven Central.
56+
57+
#### In Android projects
58+
59+
> [!IMPORTANT]
60+
> Before version 0.6.0 the Maven artifact's id was `android-sdk`. When upgrading to 0.6.0 or higher
61+
> please do make sure to use the new artifact id, which is `kotlin-sdk`.
4562
4663
```kotlin
4764
dependencies {
48-
api("dev.openfeature:android-sdk:0.4.1")
65+
api("dev.openfeature:kotlin-sdk:0.6.2")
66+
}
67+
```
68+
69+
#### In multiplatform projects
70+
71+
```kotlin
72+
kotlin {
73+
sourceSets {
74+
commonMain.dependencies {
75+
api("dev.openfeature:kotlin-sdk:0.6.2")
76+
}
77+
}
4978
}
5079
```
5180

5281
### Usage
5382

83+
> [!NOTE]
84+
> In version 0.6.0 the base package name has changed from `dev.openfeature.sdk` to
85+
> `dev.openfeature.kotlin.sdk`. When upgrading to 0.6.0 or higher please update your imports
86+
> accordingly.
87+
>
88+
> **Example:** `import dev.openfeature.sdk.EvaluationContext` ->
89+
> `import dev.openfeature.kotlin.sdk.EvaluationContext`.
90+
5491
```kotlin
55-
coroutineScope.launch(Dispatchers.IO) {
92+
coroutineScope.launch(Dispatchers.Default) {
5693
// configure a provider, wait for it to complete its initialization tasks
5794
OpenFeatureAPI.setProviderAndWait(customProvider)
5895
val client = OpenFeatureAPI.getClient()
@@ -87,7 +124,7 @@ If the provider you're looking for hasn't been created yet, see the [develop a p
87124
Once you've added a provider as a dependency, it can be registered with OpenFeature like this:
88125

89126
```kotlin
90-
coroutineScope.launch(Dispatchers.IO) {
127+
coroutineScope.launch(Dispatchers.Default) {
91128
OpenFeatureAPI.setProviderAndWait(MyProvider())
92129
}
93130
```
@@ -191,7 +228,7 @@ viewModelScope.launch {
191228
viewModelScope.launch {
192229
OpenFeatureAPI.setProviderAndWait(
193230
MyFeatureProvider(),
194-
Dispatchers.IO,
231+
Dispatchers.Default,
195232
myEvaluationContext
196233
)
197234
}

docs/reference/technologies/client/swift.mdx

Lines changed: 6 additions & 6 deletions
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 Wed Jul 16 2025 08:11:02 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Tue Aug 19 2025 08:10:36 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
<p align="center" class="github-badges">
@@ -20,8 +20,8 @@ Last updated at Wed Jul 16 2025 08:11:02 GMT+0000 (Coordinated Universal Time)
2020
</a>
2121

2222

23-
<a href="https://github.com/open-feature/swift-sdk/releases/tag/0.3.1">
24-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.3.1&color=blue&style=for-the-badge" />
23+
<a href="https://github.com/open-feature/swift-sdk/releases/tag/0.4.0">
24+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.4.0&color=blue&style=for-the-badge" />
2525
</a>
2626

2727

@@ -62,7 +62,7 @@ First, ensure you have your GitHub account added as an option (+ > Add Source Co
6262
If you manage dependencies through SPM, in the dependencies section of Package.swift add:
6363

6464
```swift
65-
.package(url: "[email protected]:open-feature/swift-sdk.git", from: "0.3.1")
65+
.package(url: "[email protected]:open-feature/swift-sdk.git", from: "0.4.0")
6666
```
6767

6868
and in the target dependencies section add:
@@ -138,9 +138,9 @@ If the flag management system you're using supports targeting, you can provide t
138138

139139
```swift
140140
// Configure your evaluation context and pass it to OpenFeatureAPI
141-
let ctx = MutableContext(
141+
let ctx = ImmutableContext(
142142
targetingKey: userId,
143-
structure: MutableStructure(attributes: ["product": Value.string(productId)]))
143+
structure: ImmutableStructure(attributes: ["product": Value.string(productId)]))
144144
OpenFeatureAPI.shared.setEvaluationContext(evaluationContext: ctx)
145145
```
146146

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 Wed Jul 16 2025 08:11:02 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Tue Aug 19 2025 08:10:36 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.15">
22-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.0.15&color=blue&style=for-the-badge" />
21+
<a href="https://github.com/open-feature/js-sdk/releases/tag/angular-sdk-v0.0.16">
22+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v0.0.16&color=blue&style=for-the-badge" />
2323
</a>
2424

2525
<br/>

docs/reference/technologies/client/web/index.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 Wed Jul 16 2025 08:11:01 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Tue Aug 19 2025 08:10:36 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.5.0">
22-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.5.0&color=blue&style=for-the-badge" />
21+
<a href="https://github.com/open-feature/js-sdk/releases/tag/web-sdk-v1.6.1">
22+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.6.1&color=blue&style=for-the-badge" />
2323
</a>
2424

2525
<br/>

docs/reference/technologies/client/web/react.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 Wed Jul 16 2025 08:11:01 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Tue Aug 19 2025 08:10:36 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/react-sdk-v1.0.0">
22-
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.0.0&color=blue&style=for-the-badge" />
21+
<a href="https://github.com/open-feature/js-sdk/releases/tag/react-sdk-v1.0.1">
22+
<img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.0.1&color=blue&style=for-the-badge" />
2323
</a>
2424

2525
<br/>

docs/reference/technologies/server/dotnet.mdx

Lines changed: 131 additions & 4 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 Wed Jul 16 2025 08:11:00 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Tue Aug 19 2025 08:10:35 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.7.0&color=blue&style=for-the-badge)
19-
](https://github.com/open-feature/dotnet-sdk/releases/tag/v2.7.0)
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)
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)
@@ -112,7 +112,8 @@ Want to contribute a new sample? See our [CONTRIBUTING](https://github.com/open-
112112
| | [Shutdown](#shutdown) | Gracefully clean up a provider during application shutdown. |
113113
| | [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). |
114114
| | [Extending](#extending) | Extend OpenFeature with custom providers and hooks. |
115-
| 🔬 | [DependencyInjection](#dependency-injection) | Integrate OpenFeature with .NET's dependency injection for streamlined provider setup. |
115+
| 🔬 | [Multi-Provider](#multi-provider) | Use multiple feature flag providers simultaneously with configurable evaluation strategies. |
116+
| 🔬 | [DependencyInjection](#dependency-injection) | Integrate OpenFeature with .NET's dependency injection for streamlined provider setup. |
116117

117118
> Implemented: ✅ | In-progress: ⚠️ | Not implemented yet: ❌ | Experimental: 🔬
118119

@@ -432,6 +433,96 @@ Hooks support passing per-evaluation data between that stages using `hook data`.
432433

433434
Built a new hook? [Let us know](https://github.com/open-feature/openfeature.dev/issues/new?assignees=&labels=hook&projects=&template=document-hook.yaml&title=%5BHook%5D%3A+) so we can add it to the docs!
434435

436+
### Multi-Provider
437+
438+
> [!NOTE]
439+
> The Multi-Provider feature is currently experimental. Hooks and events are not supported at the moment.
440+
441+
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.
442+
443+
#### Basic Usage
444+
445+
```csharp
446+
using OpenFeature.Providers.MultiProvider;
447+
using OpenFeature.Providers.MultiProvider.Models;
448+
using OpenFeature.Providers.MultiProvider.Strategies;
449+
450+
// Create provider entries
451+
var providerEntries = new List<ProviderEntry>
452+
{
453+
new(new InMemoryProvider(provider1Flags), "Provider1"),
454+
new(new InMemoryProvider(provider2Flags), "Provider2")
455+
};
456+
457+
// Create multi-provider with FirstMatchStrategy (default)
458+
var multiProvider = new MultiProvider(providerEntries, new FirstMatchStrategy());
459+
460+
// Set as the default provider
461+
await Api.Instance.SetProviderAsync(multiProvider);
462+
463+
// Use normally - the multi-provider will handle delegation
464+
var client = Api.Instance.GetClient();
465+
var flagValue = await client.GetBooleanValueAsync("my-flag", false);
466+
```
467+
468+
#### Evaluation Strategies
469+
470+
The Multi-Provider supports different evaluation strategies that determine how multiple providers are used:
471+
472+
##### FirstMatchStrategy (Default)
473+
474+
Evaluates providers sequentially and returns the first result that is not "flag not found". If any provider returns an error, that error is returned immediately.
475+
476+
```csharp
477+
var multiProvider = new MultiProvider(providerEntries, new FirstMatchStrategy());
478+
```
479+
480+
##### FirstSuccessfulStrategy
481+
482+
Evaluates providers sequentially and returns the first successful result, ignoring errors. Only if all providers fail will errors be returned.
483+
484+
```csharp
485+
var multiProvider = new MultiProvider(providerEntries, new FirstSuccessfulStrategy());
486+
```
487+
488+
##### ComparisonStrategy
489+
490+
Evaluates all providers in parallel and compares results. If values agree, returns the agreed value. If they disagree, returns the fallback provider's value (or first provider if no fallback is specified) and optionally calls a mismatch callback.
491+
492+
```csharp
493+
// Basic comparison
494+
var multiProvider = new MultiProvider(providerEntries, new ComparisonStrategy());
495+
496+
// With fallback provider
497+
var multiProvider = new MultiProvider(providerEntries,
498+
new ComparisonStrategy(fallbackProvider: provider1));
499+
500+
// With mismatch callback
501+
var multiProvider = new MultiProvider(providerEntries,
502+
new ComparisonStrategy(onMismatch: (mismatchDetails) => {
503+
// Log or handle mismatches between providers
504+
foreach (var kvp in mismatchDetails)
505+
{
506+
Console.WriteLine($"Provider {kvp.Key}: {kvp.Value}");
507+
}
508+
}));
509+
```
510+
511+
#### Evaluation Modes
512+
513+
The Multi-Provider supports two evaluation modes:
514+
515+
- **Sequential**: Providers are evaluated one after another (used by `FirstMatchStrategy` and `FirstSuccessfulStrategy`)
516+
- **Parallel**: All providers are evaluated simultaneously (used by `ComparisonStrategy`)
517+
518+
#### Limitations
519+
520+
- **Hooks are not supported**: Multi-Provider does not currently support hook registration or execution
521+
- **Events are not supported**: Provider events are not propagated from underlying providers
522+
- **Experimental status**: The API may change in future releases
523+
524+
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.
525+
435526
### Dependency Injection
436527

437528
> [!NOTE]
@@ -603,6 +694,24 @@ namespace OpenFeatureTestApp
603694

604695
After running this example, you will be able to see the traces, including the events sent by the hook in your Jaeger UI.
605696

697+
You can specify custom tags on spans created by the `TraceEnricherHook` by providing `TraceEnricherHookOptions` when adding the hook:
698+
699+
```csharp
700+
var options = TraceEnricherHookOptions.CreateBuilder()
701+
.WithTag("custom_dimension_key", "custom_dimension_value")
702+
.Build();
703+
704+
OpenFeature.Api.Instance.AddHooks(new TraceEnricherHook(options));
705+
```
706+
707+
You can also write your own extraction logic against the Flag metadata by providing a callback to `WithFlagEvaluationMetadata`. The below example will add a tag to the span with the key `boolean` and a value specified by the callback.
708+
709+
```csharp
710+
var options = TraceEnricherHookOptions.CreateBuilder()
711+
.WithFlagEvaluationMetadata("boolean", s => s.GetBool("boolean"))
712+
.Build();
713+
```
714+
606715
### Metrics Hook
607716

608717
For this hook to function correctly a global `MeterProvider` must be set.
@@ -663,3 +772,21 @@ namespace OpenFeatureTestApp
663772

664773
After running this example, you should be able to see some metrics being generated into the console.
665774

775+
You can specify custom dimensions on all instruments by the `MetricsHook` by providing `MetricsHookOptions` when adding the hook:
776+
777+
```csharp
778+
var options = MetricsHookOptions.CreateBuilder()
779+
.WithCustomDimension("custom_dimension_key", "custom_dimension_value")
780+
.Build();
781+
782+
OpenFeature.Api.Instance.AddHooks(new MetricsHook(options));
783+
```
784+
785+
You can also write your own extraction logic against the Flag metadata by providing a callback to `WithFlagEvaluationMetadata`.
786+
787+
```csharp
788+
var options = MetricsHookOptions.CreateBuilder()
789+
.WithFlagEvaluationMetadata("boolean", s => s.GetBool("boolean"))
790+
.Build();
791+
```
792+

docs/reference/technologies/server/go.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 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 Wed Jul 16 2025 08:11:01 GMT+0000 (Coordinated Universal Time)
12+
Last updated at Tue Aug 19 2025 08:10:35 GMT+0000 (Coordinated Universal Time)
1313
-->
1414

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

0 commit comments

Comments
 (0)