diff --git a/docs/reference/technologies/client/kotlin.mdx b/docs/reference/technologies/client/kotlin.mdx index 2aac5369e..511df0d87 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 Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Nov 05 2024 18:07:59 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/client/swift.mdx b/docs/reference/technologies/client/swift.mdx index 7cd7a9b70..620f7631a 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 Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Nov 05 2024 18:07:59 GMT+0000 (Coordinated Universal Time) -->

diff --git a/docs/reference/technologies/client/web/angular.mdx b/docs/reference/technologies/client/web/angular.mdx index e6822416e..6cc1cdce7 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 Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Nov 05 2024 18:07:59 GMT+0000 (Coordinated Universal Time) -->

@@ -18,8 +18,8 @@ Last updated at Thu Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) Specification - - Release + + Release
diff --git a/docs/reference/technologies/client/web/index.mdx b/docs/reference/technologies/client/web/index.mdx index 6f12540aa..6044892df 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 Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Nov 05 2024 18:07:59 GMT+0000 (Coordinated Universal Time) -->

@@ -18,8 +18,8 @@ Last updated at Thu Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) Specification - - Release + + Release
@@ -61,7 +61,7 @@ npm install --save @openfeature/web-sdk yarn add @openfeature/web-sdk @openfeature/core ``` -> [!NOTE] +> [!NOTE] > `@openfeature/core` contains common components used by all OpenFeature JavaScript implementations. > Every SDK version has a requirement on a single, specific version of this dependency. > For more information, and similar implications on libraries developed with OpenFeature see [considerations when extending](#considerations). @@ -99,6 +99,7 @@ See [here](https://open-feature.github.io/js-sdk/modules/_openfeature_web_sdk.ht | ✅ | [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. | +| ✅ | [Tracking](#tracking) | Associate user actions with feature flag evaluations, particularly for A/B testing. | | ✅ | [Shutdown](#shutdown) | Gracefully clean up a provider during application shutdown. | | ✅ | [Extending](#extending) | Extend OpenFeature with custom providers and hooks. | @@ -278,6 +279,21 @@ client.addHandler(ProviderEvents.Error, (eventDetails) => { }); ``` +### Tracking + +The tracking API allows you to use OpenFeature abstractions and objects to associate user actions with feature flag evaluations. +This is essential for robust experimentation powered by feature flags. +For example, a flag enhancing the appearance of a UI component might drive user engagement to a new feature; to test this hypothesis, telemetry collected by a [hook](#hooks) or [provider](#providers) can be associated with telemetry reported in the client's `track` function. + +```ts +// flag is evaluated +client.getBooleanValue('new-feature', false); + +// new feature is used and track function is called recording the usage +useNewFeature(); +client.track('new-feature-used'); +``` + ### Shutdown The OpenFeature API provides a close function to perform a cleanup of all registered providers. @@ -336,7 +352,7 @@ class MyProvider implements Provider { } // implement with "new OpenFeatureEventEmitter()", and use "emit()" to emit events - events?: ProviderEventEmitter | undefined; + events?: ProviderEventEmitter | undefined; initialize?(context?: EvaluationContext | undefined): Promise { // code to initialize your provider diff --git a/docs/reference/technologies/client/web/react.mdx b/docs/reference/technologies/client/web/react.mdx index d1633790e..0388adbd3 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 Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Nov 05 2024 18:07:59 GMT+0000 (Coordinated Universal Time) -->

@@ -18,8 +18,8 @@ Last updated at Thu Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) Specification - - Release + + Release
@@ -51,6 +51,7 @@ In addition to the feature provided by the [web sdk](/docs/reference/technologie - [Re-rendering with Context Changes](#re-rendering-with-context-changes) - [Re-rendering with Flag Configuration Changes](#re-rendering-with-flag-configuration-changes) - [Suspense Support](#suspense-support) + - [Tracking](#tracking) - [Testing](#testing) - [FAQ and troubleshooting](#faq-and-troubleshooting) - [Resources](#resources) @@ -129,7 +130,7 @@ function App() { #### Evaluation hooks -Within the provider, you can use the various evaluation hooks to evaluate flags. +Within the provider, you can use the various evaluation hooks to evaluate flags. ```tsx function Page() { @@ -145,7 +146,7 @@ function Page() { } ``` -You can use the strongly-typed flag value and flag evaluation detail hooks as well, if you prefer. +You can use the strongly typed flag value and flag evaluation detail hooks as well if you prefer. ```tsx import { useBooleanFlagValue } from '@openfeature/react-sdk'; @@ -171,7 +172,7 @@ const { Multiple providers can be used by passing a `domain` to the `OpenFeatureProvider`: ```tsx -// Flags within this domain will use the a client/provider associated with `my-domain`, +// Flags within this domain will use the client/provider associated with `my-domain`, function App() { return ( @@ -233,11 +234,11 @@ Note that if your provider doesn't support updates, this configuration has no im #### Suspense Support -> [!NOTE] -> React suspense is an experimental feature and subject to change in future versions. +> [!NOTE] +> React suspense is an experimental feature and is subject to change in future versions. Frequently, providers need to perform some initial startup tasks. -It may be desireable not to display components with feature flags until this is complete, or when the context changes. +It may be desirable not to display components with feature flags until this is complete or when the context changes. Built-in [suspense](https://react.dev/reference/react/Suspense) support makes this easy. Use `useSuspenseFlag` or pass `{ suspend: true }` in the hook options to leverage this functionality. @@ -270,11 +271,31 @@ function Fallback() { // component to render before READY. return

Waiting for provider to be ready...

; } - ``` This can be disabled in the hook options (or in the [OpenFeatureProvider](#openfeatureprovider-context-provider)). +#### Tracking + +The tracking API allows you to use OpenFeature abstractions and objects to associate user actions with feature flag evaluations. +This is essential for robust experimentation powered by feature flags. +For example, a flag enhancing the appearance of a UI component might drive user engagement to a new feature; to test this hypothesis, telemetry collected by a [hook](/docs/reference/technologies/client/web/#hooks) or [provider](/docs/reference/technologies/client/web/#providers) can be associated with telemetry reported in the client's `track` function. + +The React SDK includes a hook for firing tracking events in the `` context in use: + +```tsx +function MyComponent() { + // get a tracking function for this . + const { track } = useTrack(); + + // call the tracking event + // can be done in render, useEffect, or in handlers, depending on your use case + track(eventName, trackingDetails); + + return <>...; +} +``` + ### Testing The React SDK includes a built-in context provider for testing. @@ -339,23 +360,23 @@ class MyTestProvider implements Partial { > I get an error that says something like: `A React component suspended while rendering, but no fallback UI was specified.` The OpenFeature React SDK features built-in [suspense support](#suspense-support). -This means that it will render your loading fallback automatically while the your provider starts up, and during context reconciliation for any of your components using feature flags! +This means that it will render your loading fallback automatically while your provider starts up and during context reconciliation for any of your components using feature flags! If you use suspense and neglect to create a suspense boundary around any components using feature flags, you will see this error. Add a suspense boundary to resolve this issue. Alternatively, you can disable this suspense (the default) by removing `suspendWhileReconciling=true`, `suspendUntilReady=true` or `suspend=true` in the [evaluation hooks](#evaluation-hooks) or the [OpenFeatureProvider](#openfeatureprovider-context-provider) (which applies to all evaluation hooks in child components). -> I get odd rendering issues, or errors when components mount, if I use the suspense features. +> I get odd rendering issues or errors when components mount if I use the suspense features. In React 16/17's "Legacy Suspense", when a component suspends, its sibling components initially mount and then are hidden. This can cause surprising effects and inconsistencies if sibling components are rendered while the provider is still getting ready. To fix this, you can upgrade to React 18, which uses "Concurrent Suspense", in which siblings are not mounted until their suspended sibling resolves. Alternatively, if you cannot upgrade to React 18, you can use the `useWhenProviderReady` utility hook in any sibling components to prevent them from mounting until the provider is ready. -> I am using multiple `OpenFeatureProvider` contexts, but they are sharing the same provider or evaluation context. Why? +> I am using multiple `OpenFeatureProvider` contexts, but they share the same provider or evaluation context. Why? The `OpenFeatureProvider` binds a `client` to all child components, but the provider and context associated with that client is controlled by the `domain` parameter. This is consistent with all OpenFeature SDKs. -To scope an OpenFeatureProvider to a particular provider/context set the `domain` parameter on your `OpenFeatureProvider`: +To scope an OpenFeatureProvider to a particular provider/context, set the `domain` parameter on your `OpenFeatureProvider`: ```tsx @@ -365,7 +386,7 @@ To scope an OpenFeatureProvider to a particular provider/context set the `domain > I can import things form the `@openfeature/react-sdk`, `@openfeature/web-sdk`, and `@openfeature/core`; which should I use? -The `@openfeature/react-sdk` re-exports everything from its peers (`@openfeature/web-sdk` and `@openfeature/core`), and adds the React-specific features. +The `@openfeature/react-sdk` re-exports everything from its peers (`@openfeature/web-sdk` and `@openfeature/core`) and adds the React-specific features. You can import everything from the `@openfeature/react-sdk` directly. Avoid importing anything from `@openfeature/web-sdk` or `@openfeature/core`. diff --git a/docs/reference/technologies/server/dotnet.mdx b/docs/reference/technologies/server/dotnet.mdx index 06df9285e..7f2478802 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 Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Nov 05 2024 18:07:58 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) diff --git a/docs/reference/technologies/server/go.mdx b/docs/reference/technologies/server/go.mdx index bd58fd980..dcbae5800 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 Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Nov 05 2024 18:07:59 GMT+0000 (Coordinated Universal Time) -->

@@ -17,8 +17,8 @@ Last updated at Thu Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time) Specification - - Release + + Release
@@ -169,26 +169,69 @@ value, err := client.BooleanValue( ) ``` +### Tracking + +The [tracking API](/specification/sections/tracking/) allows you to use OpenFeature abstractions and objects to associate user actions with feature flag evaluations. +This is essential for robust experimentation powered by feature flags. +For example, a flag enhancing the appearance of a UI component might drive user engagement to a new feature; to test this hypothesis, telemetry collected by a [hook](#hooks) or [provider](#providers) can be associated with telemetry reported in the client's `track` function. + +```go +// initilize a client +client := openfeature.NewClient('my-app') + +// trigger tracking event action +client.Track( + context.Background(), + 'visited-promo-page', + openfeature.EvaluationContext{}, + openfeature.NewTrackingEventDetails(99.77).Add("currencyCode", "USD"), + ) +``` + +Note that some providers may not support tracking; check the documentation for your provider for more information. + ### Logging -The standard Go log package is used by default to show error logs. -This can be overridden using the structured logging, [logr](https://github.com/go-logr/logr) API, allowing integration to any package. -There are already [integration implementations](https://github.com/go-logr/logr#implementations-non-exhaustive) for many of the popular logger packages. +Note that in accordance with the OpenFeature specification, the SDK doesn't generally log messages during flag evaluation. + +#### Logging Hook + +The GO SDK includes a `LoggingHook`, which logs detailed information at key points during flag evaluation, using [slog](https://pkg.go.dev/log/slog) 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". + +##### Usage example ```go -var l logr.Logger -l = integratedlogr.New() // replace with your chosen integrator +// configure slog +var programLevel = new(slog.LevelVar) +programLevel.Set(slog.LevelDebug) +h := slog.NewJSONHandler(os.Stderr, &slog.HandlerOptions{Level: programLevel}) +slog.SetDefault(slog.New(h)) + +// add a hook globally to run on all evaluations +hook, err := NewLoggingHook(false) +if err != nil { + // handle error +} + +openfeature.AddHooks(hook) + +client.BooleanValueDetails(context.Background(), "not-exist", true, openfeature.EvaluationContext{}) + +``` -openfeature.SetLogger(l) // set the logger at global level +###### Output -c := openfeature.NewClient("log").WithLogger(l) // set the logger at client level +```sh +{"time":"2024-10-23T13:33:09.8870867+03:00","level":"DEBUG","msg":"Before stage","domain":"test-client","provider_name":"InMemoryProvider","flag_key":"not-exist","default_value":true} +{"time":"2024-10-23T13:33:09.8968242+03:00","level":"ERROR","msg":"Error stage","domain":"test-client","provider_name":"InMemoryProvider","flag_key":"not-exist","default_value":true,"error_message":"error code: FLAG_NOT_FOUND: flag for key not-exist not found"} ``` -[logr](https://github.com/go-logr/logr) uses incremental verbosity levels (akin to named levels but in integer form). -The SDK logs `info` at level `0` and `debug` at level `1`. Errors are always logged. +See [hooks](#hooks) for more information on configuring hooks. ### Domains -Clients can be assigned to a domain. A domain is a logical identifier which can be used to associate clients with a particular provider. If a domain has no associated provider, the default provider is used. + +Clients can be assigned to a domain. A domain is a logical identifier that can be used to associate clients with a particular provider. If a domain has no associated provider, the default provider is used. ```go import "github.com/open-feature/go-sdk/openfeature" @@ -384,28 +427,70 @@ func (h MyHook) Error(context context.Context, hookContext openfeature.HookConte ## Testing -To test interactions with OpenFeature API and Client, you can rely on `openfeature.IEvaluation` & `openfeature.IClient` interfaces. +The SDK provides a `NewTestProvider` which allows you to set flags for the scope of a test. +The `TestProvider` is thread-safe and can be used in tests that run in parallel. -While you may use global methods to interact with the API, it is recommended to obtain the singleton API instance so that you can use appropriate mocks for your testing needs, +Call `testProvider.UsingFlags(t, tt.flags)` to set flags for a test, and clean them up with `testProvider.Cleanup()` ```go -// global helper -openfeature.SetProvider(myProvider) +import ( + "github.com/open-feature/go-sdk/openfeature" + "github.com/open-feature/go-sdk/openfeature/testing" +) -// singleton instance - preferred -apiInstance := openfeature.GetApiInstance() -apiInstance.SetProvider(myProvider) -``` +testProvider := NewTestProvider() +err := openfeature.GetApiInstance().SetProvider(testProvider) +if err != nil { + t.Errorf("unable to set provider") +} + +// configure flags for this test suite +tests := map[string]struct { + flags map[string]memprovider.InMemoryFlag + want bool +}{ + "test when flag is true": { + flags: map[string]memprovider.InMemoryFlag{ + "my_flag": { + State: memprovider.Enabled, + DefaultVariant: "on", + Variants: map[string]any{ + "on": true, + }, + }, + }, + want: true, + }, + "test when flag is false": { + flags: map[string]memprovider.InMemoryFlag{ + "my_flag": { + State: memprovider.Enabled, + DefaultVariant: "off", + Variants: map[string]any{ + "off": false, + }, + }, + }, + want: false, + }, +} -Similarly, while you have option (due to historical reasons) to create a client with `openfeature.NewClient()` helper, it is recommended to use API to generate the client which returns an `IClient` instance. +for name, tt := range tests { + tt := tt + name := name + t.Run(name, func(t *testing.T) { -```go -// global helper -openfeature.NewClient("myClient") + // be sure to clean up your flags + defer testProvider.Cleanup() + testProvider.UsingFlags(t, tt.flags) -// using API instance - preferred -apiInstance := openfeature.GetApiInstance() -apiInstance.GetClient() -apiInstance.GetNamedClient("myClient") + // your code under test + got := functionUnderTest() + + if got != tt.want { + t.Fatalf("uh oh, value is not as expected: got %v, want %v", got, tt.want) + } + }) +} ``` diff --git a/docs/reference/technologies/server/java.mdx b/docs/reference/technologies/server/java.mdx index 58df439a3..d58263662 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 Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Nov 05 2024 18:07:58 GMT+0000 (Coordinated Universal Time) -->

@@ -18,8 +18,8 @@ Last updated at Thu Oct 17 2024 08:09:41 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.12.1 + 1.12.2 ``` @@ -77,7 +77,7 @@ If you would like snapshot builds, this is the relevant repository information: ```groovy dependencies { - implementation 'dev.openfeature:sdk:1.12.1' + implementation 'dev.openfeature:sdk:1.12.2' } ``` diff --git a/docs/reference/technologies/server/javascript/index.mdx b/docs/reference/technologies/server/javascript/index.mdx index 7a2f8275f..bbf9b4af9 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 Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Nov 05 2024 18:07:58 GMT+0000 (Coordinated Universal Time) -->

@@ -18,8 +18,8 @@ Last updated at Thu Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time) Specification - - Release + + Release
@@ -61,7 +61,7 @@ npm install --save @openfeature/server-sdk yarn add @openfeature/server-sdk @openfeature/core ``` -> [!NOTE] +> [!NOTE] > `@openfeature/core` contains common components used by all OpenFeature JavaScript implementations. > Every SDK version has a requirement on a single, specific version of this dependency. > For more information, and similar implications on libraries developed with OpenFeature see [considerations when extending](#considerations). @@ -93,15 +93,16 @@ See [here](https://open-feature.github.io/js-sdk/modules/_openfeature_server_sdk | 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](https://github.com/open-feature/js-sdk/blob/main/packages/server/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](https://github.com/open-feature/js-sdk/blob/main/packages/server/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. | +| ✅ | [Providers](#providers) | Integrate with a commercial, open source, or in-house feature management tool. | +| ✅ | [Targeting](#targeting) | Contextually-aware flag evaluation using [evaluation context](https://github.com/open-feature/js-sdk/blob/main/packages/server/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. | +| ✅ | [Transaction Context Propagation](#transaction-context-propagation) | Set a specific [evaluation context](https://github.com/open-feature/js-sdk/blob/main/packages/server/docs/reference/concepts/evaluation-context) for a transaction (e.g. an HTTP request or a thread) | +| ✅ | [Tracking](#tracking) | Associate user actions with feature flag evaluations, particularly for A/B testing. | +| ✅ | [Shutdown](#shutdown) | Gracefully clean up a provider during application shutdown. | +| ✅ | [Extending](#extending) | Extend OpenFeature with custom providers and hooks. | Implemented: ✅ | In-progress: ⚠️ | Not implemented yet: ❌ @@ -286,6 +287,21 @@ app.use((req: Request, res: Response, next: NextFunction) => { }) ``` +### Tracking + +The tracking API allows you to use OpenFeature abstractions and objects to associate user actions with feature flag evaluations. +This is essential for robust experimentation powered by feature flags. +For example, a flag enhancing the appearance of a UI component might drive user engagement to a new feature; to test this hypothesis, telemetry collected by a [hook](#hooks) or [provider](#providers) can be associated with telemetry reported in the client's `track` function. + +```ts +// flag is evaluated +await client.getBooleanValue('new-feature', false); + +// new feature is used and track function is called recording the usage +useNewFeature(); +client.track('new-feature-used'); +``` + ### Shutdown The OpenFeature API provides a close function to perform a cleanup of all registered providers. diff --git a/docs/reference/technologies/server/javascript/nestjs.mdx b/docs/reference/technologies/server/javascript/nestjs.mdx index 0e3fc244d..96dfc24d6 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 Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Nov 05 2024 18:07:58 GMT+0000 (Coordinated Universal Time) -->

@@ -18,8 +18,8 @@ Last updated at Thu Oct 17 2024 08:09:41 GMT+0000 (Coordinated Universal Time) Specification - - Release + + Release
diff --git a/docs/reference/technologies/server/php.mdx b/docs/reference/technologies/server/php.mdx index 2e3ae64f3..e4dcc8fe5 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 Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Nov 05 2024 18:07:59 GMT+0000 (Coordinated Universal Time) -->

@@ -19,8 +19,8 @@ Last updated at Thu Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) - - Release + + Release diff --git a/docs/reference/technologies/server/python.mdx b/docs/reference/technologies/server/python.mdx index b28a50ddf..2defaa938 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 Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Nov 05 2024 18:07:59 GMT+0000 (Coordinated Universal Time) -->

@@ -20,8 +20,8 @@ Last updated at Thu Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) - - Latest version + + Latest version @@ -54,13 +54,13 @@ Last updated at Thu Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) #### Pip install ```bash -pip install openfeature-sdk==0.7.1 +pip install openfeature-sdk==0.7.2 ``` #### requirements.txt ```bash -openfeature-sdk==0.7.1 +openfeature-sdk==0.7.2 ``` ```python diff --git a/docs/reference/technologies/server/ruby.mdx b/docs/reference/technologies/server/ruby.mdx index 6be0e94d5..70726f460 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 Oct 17 2024 08:09:42 GMT+0000 (Coordinated Universal Time) +Last updated at Tue Nov 05 2024 18:07:59 GMT+0000 (Coordinated Universal Time) -->

diff --git a/src/datasets/sdks/sdk-compatibility.json b/src/datasets/sdks/sdk-compatibility.json index 5c38bef2d..ea0e76e17 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.12.1", - "version": "1.12.1", + "href": "https://github.com/open-feature/java-sdk/releases/tag/v1.12.2", + "version": "1.12.2", "stable": true }, "spec": { @@ -60,8 +60,8 @@ "path": "/docs/reference/technologies/server/javascript", "category": "Server", "release": { - "href": "https://github.com/open-feature/js-sdk/releases/tag/server-sdk-v1.15.1", - "version": "1.15.1", + "href": "https://github.com/open-feature/js-sdk/releases/tag/server-sdk-v1.16.1", + "version": "1.16.1", "stable": true }, "spec": { @@ -94,8 +94,8 @@ "path": "/docs/reference/technologies/server/javascript#eventing" }, "Tracking": { - "status": "❓", - "path": "/docs/reference/technologies/server/javascript" + "status": "✅", + "path": "/docs/reference/technologies/server/javascript#tracking" }, "Transaction Context Propagation": { "status": "✅", @@ -172,8 +172,8 @@ "path": "/docs/reference/technologies/server/go", "category": "Server", "release": { - "href": "https://github.com/open-feature/go-sdk/releases/tag/v1.13.0", - "version": "1.13.0", + "href": "https://github.com/open-feature/go-sdk/releases/tag/v1.13.1", + "version": "1.13.1", "stable": true }, "spec": { @@ -228,8 +228,8 @@ "path": "/docs/reference/technologies/server/python", "category": "Server", "release": { - "href": "https://github.com/open-feature/python-sdk/releases/tag/v0.7.1", - "version": "0.7.1", + "href": "https://github.com/open-feature/python-sdk/releases/tag/v0.7.2", + "version": "0.7.2", "stable": false }, "spec": { @@ -284,8 +284,8 @@ "path": "/docs/reference/technologies/server/php", "category": "Server", "release": { - "href": "https://github.com/open-feature/php-sdk/releases/tag/2.0.9", - "version": "2.0.9", + "href": "https://github.com/open-feature/php-sdk/releases/tag/2.0.10", + "version": "2.0.10", "stable": true }, "spec": { @@ -340,8 +340,8 @@ "path": "/docs/reference/technologies/client/web", "category": "Client", "release": { - "href": "https://github.com/open-feature/js-sdk/releases/tag/web-sdk-v1.2.4", - "version": "1.2.4", + "href": "https://github.com/open-feature/js-sdk/releases/tag/web-sdk-v1.3.1", + "version": "1.3.1", "stable": true }, "spec": { @@ -374,8 +374,8 @@ "path": "/docs/reference/technologies/client/web#eventing" }, "Tracking": { - "status": "❓", - "path": "/docs/reference/technologies/client/web" + "status": "✅", + "path": "/docs/reference/technologies/client/web#tracking" }, "Shutdown": { "status": "✅",