Skip to content

Commit 1ecffec

Browse files
author
Bernd Warmuth
committed
chore: added doc to README.md
Signed-off-by: Bernd Warmuth <[email protected]>
1 parent 3e67972 commit 1ecffec

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

README.md

+22-11
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,18 @@ See [here](https://javadoc.io/doc/dev.openfeature/sdk/latest/) for the Javadocs.
120120

121121
## 🌟 Features
122122

123-
| Status | Features | Description |
124-
| ------ |-----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
125-
|| [Providers](#providers) | Integrate with a commercial, open source, or in-house feature management tool. |
126-
|| [Targeting](#targeting) | Contextually-aware flag evaluation using [evaluation context](https://openfeature.dev/docs/reference/concepts/evaluation-context). |
127-
|| [Hooks](#hooks) | Add functionality to various stages of the flag evaluation life-cycle. |
128-
|| [Logging](#logging) | Integrate with popular logging packages. |
129-
|| [Domains](#domains) | Logically bind clients with providers. |
130-
|| [Eventing](#eventing) | React to state changes in the provider or flag management system. |
131-
|| [Shutdown](#shutdown) | Gracefully clean up a provider during application shutdown. |
132-
|| [Transaction Context Propagation](#transaction-context-propagation) | Set a specific [evaluation context](https://openfeature.dev/docs/reference/concepts/evaluation-context) for a transaction (e.g. an HTTP request or a thread). |
133-
|| [Extending](#extending) | Extend OpenFeature with custom providers and hooks. |
123+
| Status | Features | Description |
124+
| ------ |---------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
125+
|| [Providers](#providers) | Integrate with a commercial, open source, or in-house feature management tool. |
126+
|| [Targeting](#targeting) | Contextually-aware flag evaluation using [evaluation context](https://openfeature.dev/docs/reference/concepts/evaluation-context). |
127+
|| [Hooks](#hooks) | Add functionality to various stages of the flag evaluation life-cycle. |
128+
|| [Tracking](#tracking) | Associate user actions with feature flag evaluations. |
129+
|| [Logging](#logging) | Integrate with popular logging packages. |
130+
|| [Domains](#domains) | Logically bind clients with providers. |
131+
|| [Eventing](#eventing) | React to state changes in the provider or flag management system. |
132+
|| [Shutdown](#shutdown) | Gracefully clean up a provider during application shutdown. |
133+
|| [Transaction Context Propagation](#transaction-context-propagation) | Set a specific [evaluation context](https://openfeature.dev/docs/reference/concepts/evaluation-context) for a transaction (e.g. an HTTP request or a thread). |
134+
|| [Extending](#extending) | Extend OpenFeature with custom providers and hooks. |
134135

135136
<sub>Implemented: ✅ | In-progress: ⚠️ | Not implemented yet: ❌</sub>
136137

@@ -215,6 +216,16 @@ Once you've added a hook as a dependency, it can be registered at the global, cl
215216
FlagEvaluationOptions.builder().hook(new ExampleHook()).build());
216217
```
217218

219+
### Tracking
220+
221+
The [tracking API](https://openfeature.dev/specification/sections/tracking/) allows you to use OpenFeature abstractions to associate user actions with feature flag evaluations.
222+
This is essential for robust experimentation powered by feature flags. Note that, unlike methods that handle feature flag evaluations, calling `track(...)` may throw an `IllegalArgumentException` if an empty string is passed as the `trackingEventName`.
223+
224+
```java
225+
OpenFeatureAPI api = OpenFeatureAPI.getInstance();
226+
api.getClient().track("visited-promo-page", new MutableTrackingEventDetails(99.77).add("currency", "USD"));
227+
```
228+
218229
### Logging
219230

220231
The Java SDK uses SLF4J. See the [SLF4J manual](https://slf4j.org/manual.html) for complete documentation.

0 commit comments

Comments
 (0)