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
Copy file name to clipboardExpand all lines: Sources/TelemetryDeck/TelemetryDeck.swift
+22-5Lines changed: 22 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,7 @@ public enum TelemetryDeck {
89
89
/// - Parameters:
90
90
/// - signalName: The name of the signal to track. This will be used to identify and stop the duration tracking later.
91
91
/// - parameters: A dictionary of additional string key-value pairs that will be included when the duration signal is eventually sent. Default is empty.
92
+
/// - includeBackgroundTime: An optional Bool where you can specify to actually include (and not exclude) the time when your app is in the background.
92
93
///
93
94
/// This function only starts tracking time – it does not send a signal. You must call `stopAndSendDurationSignal(_:parameters:)`
94
95
/// with the same signal name to finalize and actually send the signal with the tracked duration.
@@ -98,34 +99,50 @@ public enum TelemetryDeck {
98
99
/// If a new duration signal ist started while an existing duration signal with the same name was not stopped yet, the old one is replaced with the new one.
/// Stops tracking the duration of a signal and sends it with the total duration.
106
111
///
107
112
/// - Parameters:
108
113
/// - signalName: The name of the signal that was previously started with `startDurationSignal(_:parameters:)`.
109
114
/// - parameters: Additional parameters to include with the signal. These will be merged with the parameters provided at the start. Default is empty.
115
+
/// - floatValue: An optional floating-point number that can be used to provide numerical data about the signal. Default is `nil`.
116
+
/// - customUserID: An optional string specifying a custom user identifier. If provided, it will override the default user identifier from the configuration. Default is `nil`.
110
117
///
111
118
/// This function finalizes the duration tracking by:
112
119
/// 1. Stopping the timer for the given signal name
113
-
/// 2. Calculating the duration in seconds (excluding background time)
120
+
/// 2. Calculating the duration in seconds (excluding background time by default)
114
121
/// 3. Sending a signal that includes the start parameters, stop parameters, and calculated duration
115
122
///
116
123
/// The duration is included in the `TelemetryDeck.Signal.durationInSeconds` parameter.
117
124
///
118
125
/// If no matching signal was started, this function does nothing.
0 commit comments