@@ -10,16 +10,16 @@ This content has been automatically generated from kotlin-sdk.
1010Edits should be made here: https://github.com/open-feature/kotlin-sdk
1111Once a repo has been updated, docs can be generated by running: yarn update :sdk-docs
1212
13- Last updated at Tue Dec 17 2024 08:10:39 GMT+0000 (Coordinated Universal Time)
13+ Last updated at Wed Jan 01 2025 08:09:09 GMT+0000 (Coordinated Universal Time)
1414-->
1515
1616<p align = " center" class = " github-badges" >
1717 <a href = " https://github.com/open-feature/spec/releases/tag/v0.6.0" >
1818 <img alt = " Specification" src = " https://img.shields.io/static/v1?label=specification&message=v0.6.0&color=yellow&style=for-the-badge" />
1919 </a >
2020
21- <a href = " https://github.com/open-feature/kotlin-sdk/releases/tag/v0.3.0 " >
22- <img alt = " Release" src = " https://img.shields.io/static/v1?label=release&message=v0.3.0 &color=blue&style=for-the-badge" />
21+ <a href = " https://github.com/open-feature/kotlin-sdk/releases/tag/v0.3.2 " >
22+ <img alt = " Release" src = " https://img.shields.io/static/v1?label=release&message=v0.3.2 &color=blue&style=for-the-badge" />
2323 </a >
2424
2525 <br />
@@ -45,7 +45,7 @@ Installation via Maven Central is preferred, using the following dependency:
4545
4646``` kotlin
4747dependencies {
48- api(" dev.openfeature:android-sdk:0.3.0 " )
48+ api(" dev.openfeature:android-sdk:0.3.2 " )
4949}
5050```
5151
@@ -65,15 +65,16 @@ coroutineScope.launch(Dispatchers.IO) {
6565## Features
6666
6767| Status | Features | Description |
68- | ------ | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
68+ | -------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
6969| ✅ | [ Providers] ( #providers ) | Integrate with a commercial, open source, or in-house feature management tool. |
7070| ✅ | [ Targeting] ( #targeting ) | Contextually-aware flag evaluation using [ evaluation context] ( /docs/reference/concepts/evaluation-context ) . |
7171| ✅ | [ Hooks] ( #hooks ) | Add functionality to various stages of the flag evaluation life-cycle. |
72+ | ✅ | [ Tracking] ( #tracking ) | Associate user actions with feature flag evaluations. |
7273| ❌ | [ Logging] ( #logging ) | Integrate with popular logging packages. |
7374| ❌ | [ Named clients] ( #named-clients ) | Utilize multiple providers in a single application. |
7475| ✅ | [ Eventing] ( #eventing ) | React to state changes in the provider or flag management system. |
7576| ✅ | [ Shutdown] ( #shutdown ) | Gracefully clean up a provider during application shutdown. |
76- | ⚠️ | [ Extending] ( #extending ) | Extend OpenFeature with custom providers and hooks. |
77+ | ⚠️ | [ Extending] ( #extending ) | Extend OpenFeature with custom providers and hooks. |
7778
7879<sub >Implemented: ✅ | In-progress: ⚠️ | Not implemented yet: ❌</sub >
7980
@@ -125,6 +126,32 @@ client.addHooks(listOf(ExampleHook()))
125126val retval = client.getBooleanValue(flagKey, false ,
126127 FlagEvaluationOptions (listOf (ExampleHook ())))
127128```
129+
130+ ### Tracking
131+
132+ The [ tracking API] ( /specification/sections/tracking/ ) allows you to use
133+ OpenFeature abstractions to associate user actions with feature flag evaluations.
134+ This is essential for robust experimentation powered by feature flags. Note that, unlike methods
135+ that handle feature flag evaluations, calling ` track(...) ` may throw an ` IllegalArgumentException `
136+ if an empty string is passed as the ` trackingEventName ` .
137+
138+ Below is an example of how we can track a "Checkout" event with some ` TrackingDetails ` .
139+
140+ ``` kotlin
141+ OpenFeatureAPI .getClient().track(
142+ " Checkout" ,
143+ TrackingEventDetails (
144+ 499.99 ,
145+ ImmutableStructure (
146+ " numberOfItems" to Value .Integer (4 ),
147+ " timeInCheckout" to Value .String (" PT3M20S" )
148+ )
149+ )
150+ )
151+ ```
152+
153+ Tracking is optionally implemented by Providers.
154+
128155### Logging
129156
130157Logging customization is not yet available in the Kotlin SDK.
0 commit comments