Skip to content

Commit 6470077

Browse files
chore: update sdk readmes (#936)
The PR was automatically generated via the update-sdk-docs GitHub workflow. Signed-off-by: OpenFeature Bot <[email protected]>
1 parent 7587e9d commit 6470077

File tree

14 files changed

+83
-60
lines changed

14 files changed

+83
-60
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 Wed Jan 22 2025 08:09:31 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Feb 03 2025 08:09:40 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

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

docs/reference/technologies/client/swift.mdx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ 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 Jan 22 2025 08:09:31 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Feb 03 2025 08:09:40 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

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

18-
<a href="https://github.com/open-feature/spec/releases/tag/v0.7.0">
19-
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.7.0&color=yellow&style=for-the-badge" />
18+
<a href="https://github.com/open-feature/spec/releases/tag/v0.8.0">
19+
<img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge" />
2020
</a>
2121

2222

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

2727

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

6060
```swift
61-
.package(url: "[email protected]:open-feature/swift-sdk.git", from: "0.2.1")
61+
.package(url: "[email protected]:open-feature/swift-sdk.git", from: "0.3.0")
6262
```
6363

6464
and in the target dependencies section add:
@@ -84,11 +84,12 @@ Task {
8484

8585
## Features
8686

87-
| Status | Features | Description |
88-
| ------ | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
87+
| Status | Features | Description |
88+
| ------ | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
8989
|| [Providers](#providers) | Integrate with a commercial, open source, or in-house feature management tool. |
9090
|| [Targeting](#targeting) | Contextually-aware flag evaluation using [evaluation context](/docs/reference/concepts/evaluation-context). |
9191
|| [Hooks](#hooks) | Add functionality to various stages of the flag evaluation life-cycle. |
92+
|| [Tracking](#tracking) | Associate user actions with feature flag evaluations. |
9293
|| [Logging](#logging) | Integrate with popular logging packages. |
9394
|| [Named clients](#named-clients) | Utilize multiple providers in a single application. |
9495
|| [Eventing](#eventing) | React to state changes in the provider or flag management system. |
@@ -147,6 +148,10 @@ _ = client.getValue(
147148
defaultValue: false,
148149
options: FlagEvaluationOptions(hooks: [ExampleHook()]))
149150
```
151+
### Tracking
152+
153+
Tracking is not yet available in the iOS SDK.
154+
150155
### Logging
151156

152157
Logging customization is not yet available in the iOS SDK.
@@ -236,7 +241,7 @@ class BooleanHook: Hook {
236241
// do something
237242
}
238243

239-
func finallyAfter<HookValue>(ctx: HookContext<HookValue>, hints: [String: Any]) {
244+
func finally<HookValue>(ctx: HookContext<HookValue>, hints: [String: Any]) {
240245
// do something
241246
}
242247
}

docs/reference/technologies/client/web/angular.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 Wed Jan 22 2025 08:09:32 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Feb 03 2025 08:09:40 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

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

docs/reference/technologies/client/web/index.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 Wed Jan 22 2025 08:09:31 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Feb 03 2025 08:09:40 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

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

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 Wed Jan 22 2025 08:09:31 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Feb 03 2025 08:09:40 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

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

docs/reference/technologies/server/dotnet.mdx

Lines changed: 44 additions & 26 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 Jan 22 2025 08:09:30 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Feb 03 2025 08:09:39 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

1616
[![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)
1717
[
18-
![Release](https://img.shields.io/static/v1?label=release&message=v2.2.0&color=blue&style=for-the-badge)
19-
](https://github.com/open-feature/dotnet-sdk/releases/tag/v2.2.0)
18+
![Release](https://img.shields.io/static/v1?label=release&message=v2.3.0&color=blue&style=for-the-badge)
19+
](https://github.com/open-feature/dotnet-sdk/releases/tag/v2.3.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)
@@ -154,6 +154,19 @@ var value = await client.GetBooleanValueAsync("boolFlag", false, context, new Fl
154154

155155
The .NET SDK uses Microsoft.Extensions.Logging. See the [manual](https://learn.microsoft.com/en-us/dotnet/core/extensions/logging?tabs=command-line) for complete documentation.
156156

157+
#### Logging Hook
158+
159+
The .NET SDK includes a LoggingHook, which logs detailed information at key points during flag evaluation, using Microsoft.Extensions.Logging structured logging API. This hook can be particularly helpful for troubleshooting and debugging; simply attach it at the global, client or invocation level and ensure your log level is set to "debug".
160+
161+
```csharp
162+
using var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole());
163+
var logger = loggerFactory.CreateLogger("Program");
164+
165+
var client = Api.Instance.GetClient();
166+
client.AddHooks(new LoggingHook(logger));
167+
```
168+
See [hooks](#hooks) for more information on configuring hooks.
169+
157170
### Domains
158171

159172
Clients can be assigned to a domain.
@@ -380,37 +393,42 @@ builder.Services.AddOpenFeature(featureBuilder => {
380393
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.
381394

382395
```csharp
383-
services.AddOpenFeature()
384-
.AddProvider(provider =>
396+
services.AddOpenFeature(builder =>
397+
{
398+
builder.AddProvider(provider =>
399+
{
400+
// Resolve services or configurations as needed
401+
var variants = new Dictionary<string, bool> { { "on", true } };
402+
var flags = new Dictionary<string, Flag>
385403
{
386-
// Resolve services or configurations as needed
387-
var configuration = provider.GetRequiredService<IConfiguration>();
388-
var flags = new Dictionary<string, Flag>
389-
{
390-
{ "feature-key", new Flag<bool>(configuration.GetValue<bool>("FeatureFlags:Key")) }
391-
};
392-
393-
// Register a custom provider, such as InMemoryProvider
394-
return new InMemoryProvider(flags);
395-
});
404+
{ "feature-key", new Flag<bool>(variants, "on") }
405+
};
406+
407+
// Register a custom provider, such as InMemoryProvider
408+
return new InMemoryProvider(flags);
409+
});
410+
});
396411
```
397412

398413
#### Adding a Domain-Scoped Provider
399414

400415
You can also register a domain-scoped custom provider, enabling configurations specific to each domain:
401416

402417
```csharp
403-
services.AddOpenFeature()
404-
.AddProvider("my-domain", (provider, domain) =>
418+
services.AddOpenFeature(builder =>
419+
{
420+
builder.AddProvider("my-domain", (provider, domain) =>
421+
{
422+
// Resolve services or configurations as needed for the domain
423+
var variants = new Dictionary<string, bool> { { "on", true } };
424+
var flags = new Dictionary<string, Flag>
405425
{
406-
// Resolve services or configurations as needed for the domain
407-
var flags = new Dictionary<string, Flag>
408-
{
409-
{ $"{domain}-feature-key", new Flag<bool>(true) }
410-
};
411-
412-
// Register a domain-scoped custom provider such as InMemoryProvider
413-
return new InMemoryProvider(flags);
414-
});
426+
{ $"{domain}-feature-key", new Flag<bool>(variants, "on") }
427+
};
428+
429+
// Register a domain-scoped custom provider such as InMemoryProvider
430+
return new InMemoryProvider(flags);
431+
});
432+
});
415433
```
416434

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 Jan 22 2025 08:09:30 GMT+0000 (Coordinated Universal Time)
12+
Last updated at Mon Feb 03 2025 08:09:39 GMT+0000 (Coordinated Universal Time)
1313
-->
1414

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

docs/reference/technologies/server/java.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 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 Wed Jan 22 2025 08:09:29 GMT+0000 (Coordinated Universal Time)
12+
Last updated at Mon Feb 03 2025 08:09:39 GMT+0000 (Coordinated Universal Time)
1313
-->
1414

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

docs/reference/technologies/server/javascript/index.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 Wed Jan 22 2025 08:09:30 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Feb 03 2025 08:09:39 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

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

docs/reference/technologies/server/javascript/nestjs.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 Wed Jan 22 2025 08:09:30 GMT+0000 (Coordinated Universal Time)
13+
Last updated at Mon Feb 03 2025 08:09:39 GMT+0000 (Coordinated Universal Time)
1414
-->
1515

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

0 commit comments

Comments
 (0)