@openfeature/server-sdk 1.16.0 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +28 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,8 +16,8 @@
16
16
  <img alt="Specification" src="https://img.shields.io/static/v1?label=specification&message=v0.8.0&color=yellow&style=for-the-badge" />
17
17
  </a>
18
18
  <!-- x-release-please-start-version -->
19
- <a href="https://github.com/open-feature/js-sdk/releases/tag/server-sdk-v1.16.0">
20
- <img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.16.0&color=blue&style=for-the-badge" />
19
+ <a href="https://github.com/open-feature/js-sdk/releases/tag/server-sdk-v1.16.1">
20
+ <img alt="Release" src="https://img.shields.io/static/v1?label=release&message=v1.16.1&color=blue&style=for-the-badge" />
21
21
  </a>
22
22
  <!-- x-release-please-end -->
23
23
  <br/>
@@ -64,7 +64,7 @@ npm install --save @openfeature/server-sdk
64
64
  yarn add @openfeature/server-sdk @openfeature/core
65
65
  ```
66
66
 
67
- > [!NOTE]
67
+ > [!NOTE]
68
68
  > `@openfeature/core` contains common components used by all OpenFeature JavaScript implementations.
69
69
  > Every SDK version has a requirement on a single, specific version of this dependency.
70
70
  > For more information, and similar implications on libraries developed with OpenFeature see [considerations when extending](#considerations).
@@ -96,15 +96,16 @@ See [here](https://open-feature.github.io/js-sdk/modules/_openfeature_server_sdk
96
96
 
97
97
  | Status | Features | Description |
98
98
  | ------ | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
99
- | ✅ | [Providers](#providers) | Integrate with a commercial, open source, or in-house feature management tool. |
100
- | ✅ | [Targeting](#targeting) | Contextually-aware flag evaluation using [evaluation context](/docs/reference/concepts/evaluation-context). |
101
- | ✅ | [Hooks](#hooks) | Add functionality to various stages of the flag evaluation life-cycle. |
102
- | ✅ | [Logging](#logging) | Integrate with popular logging packages. |
103
- | ✅ | [Domains](#domains) | Logically bind clients with providers. |
104
- | ✅ | [Eventing](#eventing) | React to state changes in the provider or flag management system. |
105
- | ✅ | [Shutdown](#shutdown) | Gracefully clean up a provider during application shutdown. |
106
- | ✅ | [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) |
107
- | ✅ | [Extending](#extending) | Extend OpenFeature with custom providers and hooks. |
99
+ | ✅ | [Providers](#providers) | Integrate with a commercial, open source, or in-house feature management tool. |
100
+ | ✅ | [Targeting](#targeting) | Contextually-aware flag evaluation using [evaluation context](/docs/reference/concepts/evaluation-context). |
101
+ | ✅ | [Hooks](#hooks) | Add functionality to various stages of the flag evaluation life-cycle. |
102
+ | ✅ | [Logging](#logging) | Integrate with popular logging packages. |
103
+ | ✅ | [Domains](#domains) | Logically bind clients with providers. |
104
+ | ✅ | [Eventing](#eventing) | React to state changes in the provider or flag management system. |
105
+ | ✅ | [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) |
106
+ | ✅ | [Tracking](#tracking) | Associate user actions with feature flag evaluations, particularly for A/B testing. |
107
+ | ✅ | [Shutdown](#shutdown) | Gracefully clean up a provider during application shutdown. |
108
+ | ✅ | [Extending](#extending) | Extend OpenFeature with custom providers and hooks. |
108
109
 
109
110
  <sub>Implemented: ✅ | In-progress: ⚠️ | Not implemented yet: ❌</sub>
110
111
 
@@ -289,6 +290,21 @@ app.use((req: Request, res: Response, next: NextFunction) => {
289
290
  })
290
291
  ```
291
292
 
293
+ ### Tracking
294
+
295
+ The tracking API allows you to use OpenFeature abstractions and objects to associate user actions with feature flag evaluations.
296
+ This is essential for robust experimentation powered by feature flags.
297
+ 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.
298
+
299
+ ```ts
300
+ // flag is evaluated
301
+ await client.getBooleanValue('new-feature', false);
302
+
303
+ // new feature is used and track function is called recording the usage
304
+ useNewFeature();
305
+ client.track('new-feature-used');
306
+ ```
307
+
292
308
  ### Shutdown
293
309
 
294
310
  The OpenFeature API provides a close function to perform a cleanup of all registered providers.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfeature/server-sdk",
3
- "version": "1.16.0",
3
+ "version": "1.16.1",
4
4
  "description": "OpenFeature SDK for JavaScript",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "files": [