diff --git a/Sources/EmbraceCore/Capture/System/LowMemoryWarningCaptureService.swift b/Sources/EmbraceCore/Capture/System/LowMemoryWarningCaptureService.swift index 5b014e10..b328220a 100644 --- a/Sources/EmbraceCore/Capture/System/LowMemoryWarningCaptureService.swift +++ b/Sources/EmbraceCore/Capture/System/LowMemoryWarningCaptureService.swift @@ -40,7 +40,7 @@ public class LowMemoryWarningCaptureService: CaptureService { name: SpanEventSemantics.LowMemory.name, timestamp: Date(), attributes: [ - SpanEventSemantics.keyEmbraceType: .string(SpanType.lowMemory.rawValue) + SpanEventSemantics.keyEmbraceType: .string(SpanEventType.lowMemory.rawValue) ] ) diff --git a/Sources/EmbraceCore/Capture/UX/Tap/TapCaptureService.swift b/Sources/EmbraceCore/Capture/UX/Tap/TapCaptureService.swift index ba1c3b79..7936d8d2 100644 --- a/Sources/EmbraceCore/Capture/UX/Tap/TapCaptureService.swift +++ b/Sources/EmbraceCore/Capture/UX/Tap/TapCaptureService.swift @@ -82,7 +82,7 @@ public final class TapCaptureService: CaptureService { var attributes: [String: AttributeValue] = [ SpanEventSemantics.Tap.keyViewName: .string(viewName), - SpanEventSemantics.keyEmbraceType: .string(SpanType.tap.rawValue) + SpanEventSemantics.keyEmbraceType: .string(SpanEventType.tap.rawValue) ] // get coordinates diff --git a/Sources/EmbraceCore/Capture/WebView/WebViewCaptureService.swift b/Sources/EmbraceCore/Capture/WebView/WebViewCaptureService.swift index 24a5d987..5c325135 100644 --- a/Sources/EmbraceCore/Capture/WebView/WebViewCaptureService.swift +++ b/Sources/EmbraceCore/Capture/WebView/WebViewCaptureService.swift @@ -80,7 +80,7 @@ public final class WebViewCaptureService: CaptureService { let urlString = getUrlString(url: url) var attributes: [String: AttributeValue] = [ - SpanEventSemantics.keyEmbraceType: .string(SpanType.webView.rawValue), + SpanEventSemantics.keyEmbraceType: .string(SpanEventType.webView.rawValue), SpanEventSemantics.WebView.keyUrl: .string(urlString) ] diff --git a/Sources/EmbraceCore/Internal/Embrace+Config.swift b/Sources/EmbraceCore/Internal/Embrace+Config.swift index 630f1e01..41501dfa 100644 --- a/Sources/EmbraceCore/Internal/Embrace+Config.swift +++ b/Sources/EmbraceCore/Internal/Embrace+Config.swift @@ -50,7 +50,6 @@ extension Embrace { userAgent: EmbraceMeta.userAgent ) - let usedDigits = UInt(6) return RemoteConfig( options: options, logger: logger diff --git a/Sources/EmbraceCore/Public/Events/Breadcrumb.swift b/Sources/EmbraceCore/Public/Events/Breadcrumb.swift index 116081f1..d7243d8c 100644 --- a/Sources/EmbraceCore/Public/Events/Breadcrumb.swift +++ b/Sources/EmbraceCore/Public/Events/Breadcrumb.swift @@ -26,7 +26,7 @@ public class Breadcrumb: NSObject, SpanEvent { self.timestamp = timestamp self.attributes = attributes self.attributes[SpanEventSemantics.Breadcrumb.keyMessage] = .string(message) - self.attributes[SpanEventSemantics.keyEmbraceType] = .string(SpanType.breadcrumb.rawValue) + self.attributes[SpanEventSemantics.keyEmbraceType] = .string(SpanEventType.breadcrumb.rawValue) } } diff --git a/Sources/EmbraceCore/Public/PushNotifications/PushNotificationEvent.swift b/Sources/EmbraceCore/Public/PushNotifications/PushNotificationEvent.swift index 0baa6481..33ce6abc 100644 --- a/Sources/EmbraceCore/Public/PushNotifications/PushNotificationEvent.swift +++ b/Sources/EmbraceCore/Public/PushNotifications/PushNotificationEvent.swift @@ -63,7 +63,7 @@ public class PushNotificationEvent: NSObject, SpanEvent { var dict: [String: AttributeValue] = [:] // set types - dict[SpanEventSemantics.keyEmbraceType] = .string(SpanType.pushNotification.rawValue) + dict[SpanEventSemantics.keyEmbraceType] = .string(SpanEventType.pushNotification.rawValue) dict[SpanEventSemantics.PushNotification.keyType] = isSilent(userInfo: apsDict) ? .string(SpanEventSemantics.PushNotification.silentType) : diff --git a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+Breadcrumb.swift b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+Breadcrumb.swift index 4596ed8e..5dc8cdbf 100644 --- a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+Breadcrumb.swift +++ b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+Breadcrumb.swift @@ -4,12 +4,16 @@ import EmbraceCommonInternal -public extension SpanType { - static let breadcrumb = SpanType(system: "breadcrumb") +public extension SpanEventType { + static let breadcrumb = SpanEventType(system: "breadcrumb") } public extension SpanEventSemantics { - @available(*, deprecated, message: "Use Breadcrumb as this struct will be removed in future versions", renamed: "Breadcrumb") + @available( + *, + deprecated, + message: "Use Breadcrumb as this struct will be removed in future versions", + renamed: "Breadcrumb") struct Bradcrumb { public static let name: String = Breadcrumb.name public static let keyMessage: String = Breadcrumb.keyMessage @@ -20,3 +24,12 @@ public extension SpanEventSemantics { public static let keyMessage = "message" } } + +public extension SpanType { + @available( + *, + deprecated, + renamed: "SpanEventType.breadcrumb", + message: "Has been moved to `SpanEventType.breadcrumb`") + static let breadcrumb = SpanType(system: "breadcrumb") +} diff --git a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+LowMemory.swift b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+LowMemory.swift index f9f18a0f..27903f67 100644 --- a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+LowMemory.swift +++ b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+LowMemory.swift @@ -3,8 +3,8 @@ // import EmbraceCommonInternal -public extension SpanType { - static let lowMemory = SpanType(system: "low_memory") +public extension SpanEventType { + static let lowMemory = SpanEventType(system: "low_memory") } public extension SpanEventSemantics { @@ -12,3 +12,12 @@ public extension SpanEventSemantics { public static let name = "emb-device-low-memory" } } + +public extension SpanType { + @available( + *, + deprecated, + renamed: "SpanEventType.lowMemory", + message: "Has been moved to `SpanEventType.lowMemory`") + static let lowMemory = SpanType(system: "low_memory") +} diff --git a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+PushNotification.swift b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+PushNotification.swift index 419f8d06..b570b7ab 100644 --- a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+PushNotification.swift +++ b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+PushNotification.swift @@ -4,8 +4,8 @@ import EmbraceCommonInternal -public extension SpanType { - static let pushNotification = SpanType(system: "push_notification") +public extension SpanEventType { + static let pushNotification = SpanEventType(system: "push_notification") } public extension SpanEventSemantics { @@ -23,3 +23,12 @@ public extension SpanEventSemantics { public static let silentType = "silent" } } + +public extension SpanType { + @available( + *, + deprecated, + renamed: "SpanEventType.pushNotification", + message: "Has been moved to `SpanEventType.pushNotification`") + static let pushNotification = SpanEventType(system: "push_notification") +} diff --git a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+Tap.swift b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+Tap.swift index 41bb703a..f716546d 100644 --- a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+Tap.swift +++ b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+Tap.swift @@ -4,8 +4,8 @@ import EmbraceCommonInternal -public extension SpanType { - static let tap = SpanType(ux: "tap") +public extension SpanEventType { + static let tap = SpanEventType(ux: "tap") } public extension SpanEventSemantics { @@ -15,3 +15,8 @@ public extension SpanEventSemantics { public static let keyCoordinates = "tap.coords" } } + +public extension SpanType { + @available(*, deprecated, renamed: "SpanEventType.tap", message: "Has been moved to `SpanEventType.tap`") + static let tap = SpanType(ux: "tap") +} diff --git a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+WebView.swift b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+WebView.swift index 7a2d32de..f3557869 100644 --- a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+WebView.swift +++ b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+WebView.swift @@ -4,8 +4,8 @@ import EmbraceCommonInternal -public extension SpanType { - static let webView = SpanType(ux: "webview") +public extension SpanEventType { + static let webView = SpanEventType(ux: "webview") } public extension SpanEventSemantics { @@ -15,3 +15,8 @@ public extension SpanEventSemantics { public static let keyErrorCode = "webview.error_code" } } + +public extension SpanType { + @available(*, deprecated, renamed: "SpanEventType.webView", message: "Has been moved to `SpanEventType.webView`") + static let webView = SpanType(ux: "webview") +}