From 7b154d9fae6c99ff8c7561c0e2337004ae56ac68 Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Fri, 17 Jan 2025 08:40:05 -0500 Subject: [PATCH] chore: update sdk readmes (#894) The PR was automatically generated via the update-sdk-docs GitHub workflow. Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Co-authored-by: Michael Beemer --- docs/reference/technologies/client/kotlin.mdx | 8 +-- docs/reference/technologies/client/swift.mdx | 2 +- .../technologies/client/web/angular.mdx | 2 +- .../technologies/client/web/index.mdx | 2 +- .../technologies/client/web/react.mdx | 2 +- docs/reference/technologies/server/dotnet.mdx | 51 ++++++++++++++----- docs/reference/technologies/server/go.mdx | 2 +- docs/reference/technologies/server/java.mdx | 12 ++--- .../technologies/server/javascript/index.mdx | 2 +- .../technologies/server/javascript/nestjs.mdx | 2 +- docs/reference/technologies/server/php.mdx | 2 +- docs/reference/technologies/server/python.mdx | 2 +- docs/reference/technologies/server/ruby.mdx | 2 +- src/datasets/sdks/sdk-compatibility.json | 12 ++--- 14 files changed, 63 insertions(+), 40 deletions(-) diff --git a/docs/reference/technologies/client/kotlin.mdx b/docs/reference/technologies/client/kotlin.mdx index d37a0aed..1663e4d5 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 Thu Jan 02 2025 08:08:55 GMT+0000 (Coordinated Universal Time) +Last updated at Fri Jan 17 2025 08:09:01 GMT+0000 (Coordinated Universal Time) -->

@@ -18,8 +18,8 @@ Last updated at Thu Jan 02 2025 08:08:55 GMT+0000 (Coordinated Universal Time) Specification - - Release + + Release
@@ -45,7 +45,7 @@ Installation via Maven Central is preferred, using the following dependency: ```kotlin dependencies { - api("dev.openfeature:android-sdk:0.3.2") + api("dev.openfeature:android-sdk:0.3.3") } ``` diff --git a/docs/reference/technologies/client/swift.mdx b/docs/reference/technologies/client/swift.mdx index 17694ddf..6208d024 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 Thu Jan 02 2025 08:08:55 GMT+0000 (Coordinated Universal Time) +Last updated at Fri Jan 17 2025 08:09:01 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/client/web/angular.mdx b/docs/reference/technologies/client/web/angular.mdx index 40959668..4b8cc933 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 Thu Jan 02 2025 08:08:55 GMT+0000 (Coordinated Universal Time) +Last updated at Fri Jan 17 2025 08:09:02 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/client/web/index.mdx b/docs/reference/technologies/client/web/index.mdx index 4dccd66f..bb3825ce 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 Thu Jan 02 2025 08:08:54 GMT+0000 (Coordinated Universal Time) +Last updated at Fri Jan 17 2025 08:09:01 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/client/web/react.mdx b/docs/reference/technologies/client/web/react.mdx index 03aed0dc..75a8a37b 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 Thu Jan 02 2025 08:08:55 GMT+0000 (Coordinated Universal Time) +Last updated at Fri Jan 17 2025 08:09:01 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/server/dotnet.mdx b/docs/reference/technologies/server/dotnet.mdx index 4ec57c9a..85eca140 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 Thu Jan 02 2025 08:08:54 GMT+0000 (Coordinated Universal Time) +Last updated at Fri Jan 17 2025 08:09:00 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) @@ -69,18 +69,19 @@ public async Task Example() ## 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. | -| ✅ | [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. | -| ✅ | [Extending](#extending) | Extend OpenFeature with custom providers and hooks. | -| 🔬 | [DependencyInjection](#DependencyInjection) | Integrate OpenFeature with .NET's dependency injection for streamlined provider setup. | +| 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. | +| 🔬 | [DependencyInjection](#DependencyInjection) | Integrate OpenFeature with .NET's dependency injection for streamlined provider setup. | > Implemented: ✅ | In-progress: ⚠️ | Not implemented yet: ❌ | Experimental: 🔬 @@ -235,6 +236,28 @@ The OpenFeature API provides a close function to perform a cleanup of all regist await Api.Instance.ShutdownAsync(); ``` +### Transaction Context Propagation + +Transaction context is a container for transaction-specific evaluation context (e.g. user id, user agent, IP). +Transaction context can be set where specific data is available (e.g. an auth service or request handler) and by using the transaction context propagator it will automatically be applied to all flag evaluations within a transaction (e.g. a request or thread). +By default, the `NoOpTransactionContextPropagator` is used, which doesn't store anything. +To register a [AsyncLocal](https://learn.microsoft.com/en-us/dotnet/api/system.threading.asynclocal-1) context propagator, you can use the `SetTransactionContextPropagator` method as shown below. + +```csharp +// registering the AsyncLocalTransactionContextPropagator +Api.Instance.SetTransactionContextPropagator(new AsyncLocalTransactionContextPropagator()); +``` +Once you've registered a transaction context propagator, you can propagate the data into request-scoped transaction context. + +```csharp +// adding userId to transaction context +EvaluationContext transactionContext = EvaluationContext.Builder() + .Set("userId", userId) + .Build(); +Api.Instance.SetTransactionContext(transactionContext); +``` +Additionally, you can develop a custom transaction context propagator by implementing the `TransactionContextPropagator` interface and registering it as shown above. + ## Extending ### Develop a provider @@ -306,7 +329,7 @@ public class MyHook : Hook // code to run if there's an error during before hooks or during flag evaluation } - public ValueTask FinallyAsync(HookContext context, IReadOnlyDictionary hints = null) + public ValueTask FinallyAsync(HookContext context, FlagEvaluationDetails evaluationDetails, IReadOnlyDictionary hints = null) { // code to run after all other stages, regardless of success/failure } diff --git a/docs/reference/technologies/server/go.mdx b/docs/reference/technologies/server/go.mdx index 9453e01e..07593c5b 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 Thu Jan 02 2025 08:08:54 GMT+0000 (Coordinated Universal Time) +Last updated at Fri Jan 17 2025 08:09:00 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/server/java.mdx b/docs/reference/technologies/server/java.mdx index 3c6157f2..8d88b443 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 Thu Jan 02 2025 08:08:54 GMT+0000 (Coordinated Universal Time) +Last updated at Fri Jan 17 2025 08:09:00 GMT+0000 (Coordinated Universal Time) -->

@@ -18,8 +18,8 @@ Last updated at Thu Jan 02 2025 08:08:54 GMT+0000 (Coordinated Universal Time) - - Release + + Release @@ -54,7 +54,7 @@ Note that this library is intended to be used in server-side contexts and has no dev.openfeature sdk - 1.13.0 + 1.14.0 ``` @@ -77,7 +77,7 @@ If you would like snapshot builds, this is the relevant repository information: ```groovy dependencies { - implementation 'dev.openfeature:sdk:1.13.0' + implementation 'dev.openfeature:sdk:1.14.0' } ``` @@ -418,7 +418,7 @@ class MyHook implements Hook { } @Override - public void finallyAfter(HookContext ctx, Map hints) { + public void finallyAfter(HookContext ctx, FlagEvaluationDetails details, Map hints) { // code that runs regardless of success or error } }; diff --git a/docs/reference/technologies/server/javascript/index.mdx b/docs/reference/technologies/server/javascript/index.mdx index fd3c0694..aa446ac2 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 Thu Jan 02 2025 08:08:54 GMT+0000 (Coordinated Universal Time) +Last updated at Fri Jan 17 2025 08:09:00 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/server/javascript/nestjs.mdx b/docs/reference/technologies/server/javascript/nestjs.mdx index fac7a182..2dac551c 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 Thu Jan 02 2025 08:08:54 GMT+0000 (Coordinated Universal Time) +Last updated at Fri Jan 17 2025 08:09:00 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/server/php.mdx b/docs/reference/technologies/server/php.mdx index 19f86bdb..3caa3c38 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 Thu Jan 02 2025 08:08:54 GMT+0000 (Coordinated Universal Time) +Last updated at Fri Jan 17 2025 08:09:01 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/server/python.mdx b/docs/reference/technologies/server/python.mdx index ecd11e09..5f2c87f7 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 Thu Jan 02 2025 08:08:54 GMT+0000 (Coordinated Universal Time) +Last updated at Fri Jan 17 2025 08:09:00 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/server/ruby.mdx b/docs/reference/technologies/server/ruby.mdx index b93a3413..1e0a2b59 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 Thu Jan 02 2025 08:08:55 GMT+0000 (Coordinated Universal Time) +Last updated at Fri Jan 17 2025 08:09:01 GMT+0000 (Coordinated Universal Time) -->

diff --git a/src/datasets/sdks/sdk-compatibility.json b/src/datasets/sdks/sdk-compatibility.json index 41a5910e..61807885 100644 --- a/src/datasets/sdks/sdk-compatibility.json +++ b/src/datasets/sdks/sdk-compatibility.json @@ -4,8 +4,8 @@ "path": "/docs/reference/technologies/server/java", "category": "Server", "release": { - "href": "https://github.com/open-feature/java-sdk/releases/tag/v1.13.0", - "version": "1.13.0", + "href": "https://github.com/open-feature/java-sdk/releases/tag/v1.14.0", + "version": "1.14.0", "stable": true }, "spec": { @@ -154,8 +154,8 @@ "path": "/docs/reference/technologies/server/dotnet#tracking" }, "Transaction Context Propagation": { - "status": "❓", - "path": "/docs/reference/technologies/server/dotnet" + "status": "✅", + "path": "/docs/reference/technologies/server/dotnet#transaction-context-propagation" }, "Shutdown": { "status": "✅", @@ -392,8 +392,8 @@ "path": "/docs/reference/technologies/client/kotlin", "category": "Client", "release": { - "href": "https://github.com/open-feature/kotlin-sdk/releases/tag/v0.3.2", - "version": "0.3.2", + "href": "https://github.com/open-feature/kotlin-sdk/releases/tag/v0.3.3", + "version": "0.3.3", "stable": false }, "spec": {