You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ✅ |[Tracking](#tracking)| Associate user actions with feature flag evaluations. |
73
73
| ❌ |[Logging](#logging)| Integrate with popular logging packages. |
74
74
| ❌ |[Named clients](#named-clients)| Utilize multiple providers in a single application. |
75
-
|❌|[Eventing](#eventing)| React to state changes in the provider or flag management system. |
75
+
|✅|[Eventing](#eventing)| React to state changes in the provider or flag management system. |
76
76
| ✅ |[Shutdown](#shutdown)| Gracefully clean up a provider during application shutdown. |
77
77
| ⚠️ |[Extending](#extending)| Extend OpenFeature with custom providers and hooks. |
78
78
@@ -167,13 +167,35 @@ Tracking is optionally implemented by Providers.
167
167
168
168
Logging customization is not yet available in the Kotlin SDK.
169
169
170
+
It is possible to write and inject logging `Hook`s to log events at different stages of the flag evaluation life-cycle.
171
+
170
172
### Named clients
171
173
172
174
Support for named clients is not yet available in the Kotlin SDK.
173
175
174
176
### Eventing
175
177
176
-
Support for eventing is not yet available in the Kotlin SDK.
178
+
Events from the Provider allow the SDK to react to state changes in the provider or underlying flag management system, such as flag definition changes, provider readiness, or error conditions.
179
+
Events are optional which mean that not all Providers will emit them and it is not a must have. Some providers support additional events, such as `PROVIDER_CONFIGURATION_CHANGED`.
180
+
181
+
Please refer to the documentation of the provider you're using to see what events are supported.
182
+
183
+
Example usage:
184
+
```kotlin
185
+
viewModelScope.launch {
186
+
OpenFeatureAPI.observe().collect {
187
+
println(">> Provider event received")
188
+
}
189
+
}
190
+
191
+
viewModelScope.launch {
192
+
OpenFeatureAPI.setProviderAndWait(
193
+
MyFeatureProvider(),
194
+
Dispatchers.IO,
195
+
myEvaluationContext
196
+
)
197
+
}
198
+
```
177
199
178
200
### Shutdown
179
201
@@ -240,6 +262,18 @@ class NewProvider(override val hooks: List<Hook<*>>, override val metadata: Meta
0 commit comments