@@ -118,6 +118,19 @@ If the hook you're looking for hasn't been created yet, see the [develop a hook]
118118
119119Once you've added a hook as a dependency, it can be registered at the global, client, or flag invocation level.
120120
121+ ``` kotlin
122+ // add a hook globally, to run on all evaluations
123+ OpenFeatureAPI .addHooks(listOf (ExampleHook ()))
124+
125+ // add a hook on this client, to run on all evaluations made by this client
126+ val client = OpenFeatureAPI .getClient()
127+ client.addHooks(listOf (ExampleHook ()))
128+
129+ // add a hook for this evaluation only
130+ val retval = client.getBooleanValue(flagKey, false ,
131+ FlagEvaluationOptions (listOf (ExampleHook ())))
132+ ```
133+
121134### Tracking
122135
123136The [ tracking API] ( https://openfeature.dev/specification/sections/tracking/ ) allows you to use
@@ -143,19 +156,6 @@ OpenFeatureAPI.getClient().track(
143156
144157Tracking is optionally implemented by Providers.
145158
146-
147- ``` kotlin
148- // add a hook globally, to run on all evaluations
149- OpenFeatureAPI .addHooks(listOf (ExampleHook ()))
150-
151- // add a hook on this client, to run on all evaluations made by this client
152- val client = OpenFeatureAPI .getClient()
153- client.addHooks(listOf (ExampleHook ()))
154-
155- // add a hook for this evaluation only
156- val retval = client.getBooleanValue(flagKey, false ,
157- FlagEvaluationOptions (listOf (ExampleHook ())))
158- ```
159159### Logging
160160
161161Logging customization is not yet available in the Kotlin SDK.
0 commit comments