@@ -25,6 +25,10 @@ public final class TelemetryManagerConfiguration: @unchecked Sendable {
2525 /// (Don't change this unless you know exactly what you're doing)
2626 public let apiBaseURL : URL
2727
28+ /// The namespace to send signals to. Defaults to the default Telemetry API server namespace.
29+ /// (Don't change this unless you know exactly what you're doing)
30+ public let namespace : String ?
31+
2832 /// This string will be appended to to all user identifiers before hashing them.
2933 ///
3034 /// Set the salt to a random string of 64 letters, integers and special characters to prevent the unlikely
@@ -162,15 +166,24 @@ public final class TelemetryManagerConfiguration: @unchecked Sendable {
162166 /// Defaults to an empty array.
163167 public var metadataEnrichers : [ SignalEnricher ] = [ ]
164168
165- public init ( appID: String , salt: String ? = nil , baseURL: URL ? = nil ) {
166- telemetryAppID = appID
169+ /// Creates a new configuration for the TelemetryDeck analytics service.
170+ ///
171+ /// - Parameters:
172+ /// - appID: Your application's unique identifier for TelemetryDeck
173+ /// - salt: A string used to salt user identifiers before hashing. If not provided, an empty string will be used.
174+ /// - baseURL: The base URL for the TelemetryDeck API. Defaults to the standard TelemetryDeck server if not specified.
175+ /// - namespace: An optional namespace for segregating signals. Do not specify unless you know what you're doing.
176+ public init ( appID: String , salt: String ? = nil , baseURL: URL ? = nil , namespace: String ? = nil ) {
177+ self . telemetryAppID = appID
167178
168179 if let baseURL = baseURL {
169- apiBaseURL = baseURL
180+ self . apiBaseURL = baseURL
170181 } else {
171- apiBaseURL = URL ( string: " https://nom.telemetrydeck.com " ) !
182+ self . apiBaseURL = URL ( string: " https://nom.telemetrydeck.com " ) !
172183 }
173184
185+ self . namespace = namespace
186+
174187 if let salt = salt {
175188 self . salt = salt
176189 } else {
0 commit comments