Skip to content

Commit 0f89b33

Browse files
committed
docs: document duration signals
1 parent 4552b79 commit 0f89b33

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,23 @@ val builder = TelemetryDeck.Builder()
409409
* You can provide your own logic for session tracking by adopting
410410
`TelemetryDeckSessionManagerProvider` and setting it as the session manager.
411411

412+
## Duration Signals
413+
414+
The SDK offers convenience methods to facilitate tracking the duration of specific objects or events.
415+
416+
Once started, a duration signal will be tracked internally by the SDK and upon completion, it will send the signal while also adding a `TelemetryDeck.Signal.durationInSeconds` parameter.
417+
418+
```kotlin
419+
// start tracking, without sending a signal
420+
TelemetryDeck.startDurationSignal("wizard_step1")
421+
422+
// end tracking, sends the signal including the total duration (excluding background time)
423+
TelemetryDeck.stopAndSendDurationSignal("wizard_step1")
424+
```
425+
426+
Duration signals are provided by the `DurationSignalTrackerProvider` which is always enabled.
427+
428+
412429
## Calendar Parameters
413430

414431
By default, the KotlinSDK will append the following parameters to all outgoing signals:

0 commit comments

Comments
 (0)