From f4e4d3f08eb5212b0b911abed6d3e54830e2c5f3 Mon Sep 17 00:00:00 2001 From: Austin Emmons Date: Wed, 18 Sep 2024 13:26:23 -0400 Subject: [PATCH] Updates EmbraceSemantics to move definitions under `SpanEventType` These were incorrectly defined under `SpanType` --- .../Capture/System/LowMemoryWarningCaptureService.swift | 2 +- Sources/EmbraceCore/Capture/UX/Tap/TapCaptureService.swift | 2 +- .../EmbraceCore/Capture/WebView/WebViewCaptureService.swift | 2 +- Sources/EmbraceCore/Public/Events/Breadcrumb.swift | 2 +- .../Public/PushNotifications/PushNotificationEvent.swift | 2 +- .../SpanEvent/SpanEventSemantics+Breadcrumb.swift | 4 ++-- .../SpanEvent/SpanEventSemantics+LowMemory.swift | 4 ++-- .../SpanEvent/SpanEventSemantics+PushNotification.swift | 4 ++-- .../EmbraceSemantics/SpanEvent/SpanEventSemantics+Tap.swift | 4 ++-- .../SpanEvent/SpanEventSemantics+WebView.swift | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Sources/EmbraceCore/Capture/System/LowMemoryWarningCaptureService.swift b/Sources/EmbraceCore/Capture/System/LowMemoryWarningCaptureService.swift index 740fc5f9..ac2f8d7b 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 2215f20a..b3fbbcde 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 8ddc2ba2..ea02c043 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/Public/Events/Breadcrumb.swift b/Sources/EmbraceCore/Public/Events/Breadcrumb.swift index 799b9328..b6f63214 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.Bradcrumb.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 ae92adb3..6259e209 100644 --- a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+Breadcrumb.swift +++ b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+Breadcrumb.swift @@ -4,8 +4,8 @@ import EmbraceCommonInternal -public extension SpanType { - static let breadcrumb = SpanType(system: "breadcrumb") +public extension SpanEventType { + static let breadcrumb = SpanEventType(system: "breadcrumb") } public extension SpanEventSemantics { diff --git a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+LowMemory.swift b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+LowMemory.swift index f9f18a0f..3e339a1d 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 { diff --git a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+PushNotification.swift b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+PushNotification.swift index 419f8d06..f7a2d19f 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 { diff --git a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+Tap.swift b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+Tap.swift index 41bb703a..28f02272 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 { diff --git a/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+WebView.swift b/Sources/EmbraceSemantics/SpanEvent/SpanEventSemantics+WebView.swift index 7a2d32de..87fd886d 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 {