From eaf6db20d81e0f690b71c31cb140e8497b797de1 Mon Sep 17 00:00:00 2001 From: Ignacio Tischelman <114942102+NachoEmbrace@users.noreply.github.com> Date: Wed, 11 Sep 2024 12:43:47 -0300 Subject: [PATCH] Updating OTel dependencies to v1.10.1 (#51) --- .../xcshareddata/swiftpm/Package.resolved | 20 +- .../xcshareddata/swiftpm/Package.resolved | 257 ------------------ .../Export/Log/StdoutLogExporter.swift | 6 +- .../Minigames/Reflex/ReflexGameModel.swift | 2 + .../Menu/Minigames/Simon/SimonGameModel.swift | 3 +- .../xcshareddata/swiftpm/Package.resolved | 20 +- Package.resolved | 13 +- Package.swift | 6 +- .../LowPowerModeCaptureService.swift | 1 + .../Capture/UX/Tap/TapCaptureService.swift | 4 +- .../WebView/WebViewCaptureService.swift | 1 + .../EmbraceCore/Internal/Embrace+Setup.swift | 1 + .../Logs/DefaultEmbraceLogSharedState.swift | 9 +- .../Exporter/StorageEmbraceLogExporter.swift | 15 +- .../Validation/LogDataValidation.swift | 1 + .../Validation/LogDataValidator.swift | 1 + .../Validators/LengthOfBodyValidator.swift | 3 +- .../ResourceStorageExporter.swift | 2 + .../Validation/SpanDataValidation.swift | 1 + .../Validation/SpanDataValidator.swift | 3 +- .../Validators/LengthOfNameValidator.swift | 1 + .../WhitespaceSpanNameValidator.swift | 1 + .../Tracing/EmbraceSpanProcessor+Setup.swift | 1 + .../Tracing/StorageSpanExporter.swift | 11 +- .../Builders/SpansPayloadBuilder.swift | 1 + .../Payload/Spans/SpanPayload.swift | 1 + .../Public/Embrace+CrashReporter.swift | 4 +- Sources/EmbraceCore/Public/Embrace+OTel.swift | 6 +- .../Public/Events/Breadcrumb.swift | 1 + .../PushNotificationEvent.swift | 1 + .../Session/SessionController.swift | 1 + .../Session/SessionSpanUtils.swift | 1 + .../EmbraceCore/Utils/NSObject+Embrace.swift | 1 + .../Utils/W3C/W3C+TraceParent.swift | 1 + .../Options/Options+CaptureService.swift | 2 +- Sources/EmbraceOTelInternal/EmbraceOTel.swift | 2 +- .../Logs/EmbraceLogRecordBuilder.swift | 9 +- .../Logs/EmbraceLoggerSharedState.swift | 2 +- .../EmbraceSemantics/LogRecord+Embrace.swift | 1 + .../Exporter/EmbraceLogRecordExporter.swift | 9 - .../EmbraceLogRecordProcessor.swift | 7 +- .../Processors/SingleLogRecordProcessor.swift | 11 +- .../Logs/ReadableLogRecord.swift | 8 - .../Shared/EmbraceResource.swift | 2 - .../Shared/EmbraceResourceProvider.swift | 1 - .../Trace/Tracer/OpenTelemetryTypes.swift | 38 --- .../Span/Exporter/EmbraceSpanExporter.swift | 10 - .../Span/Processor/BatchSpanProcessor.swift | 7 - .../Span/Processor/EmbraceSpanProcessor.swift | 9 - .../Span/Processor/SingleSpanProcessor.swift | 9 +- .../Trace/Tracer/Span/SpanEvent.swift | 1 + .../Trace/Tracer/Span/SpanLink.swift | 3 + .../DefaultURLSessionTaskHandlerTests.swift | 1 + .../LowPowerModeCaptureServiceTests.swift | 1 + .../EmbraceIntegrationTests.swift | 1 + .../Internal/DefaultInternalLoggerTests.swift | 11 +- .../Logs/EmbraceLoggerSharedStateTests.swift | 2 +- .../StorageEmbraceLogExporterTests.swift | 5 +- .../Validation/LogDataValidationTests.swift | 1 + .../LengthOfBodyValidatorTests.swift | 4 +- .../Public/EmbraceCoreTests.swift | 1 + .../Session/UnsentDataHandlerTests.swift | 2 +- .../TestSupport/MockLogDataValidator.swift | 2 +- .../TestSupport/MockSpanDataValidator.swift | 2 +- .../ExtendableCrashReporterMock.swift | 2 +- .../EmbraceOTelTests.swift | 8 +- .../Logs/EmbraceLogRecordBuilderTests.swift | 4 +- .../Logs/GenericLogExporterTests.swift | 6 +- ...raceLogRecordProcessorArrayExtension.swift | 4 +- .../SingleLogRecordProcessorTests.swift | 3 +- .../Mocks/DummyEmbraceLogShared.swift | 2 +- .../Mocks/DummyEmbraceResourceProvider.swift | 1 + .../Mocks/EmbraceLogRecordExporter.swift | 10 +- .../Mocks/MockEmbraceLogSharedState.swift | 4 +- .../Mocks/SpyEmbraceResourceProvider.swift | 2 +- .../Mocks/SpyLoggerProcessor.swift | 7 +- .../Shared/EmbraceResourceProviderTests.swift | 2 +- .../SpanProcessor/NoopSpanProcessor.swift | 8 +- .../Processor/SingleSpanProcessorTests.swift | 6 +- ...IdentifierToSpanRecordMigrationTests.swift | 2 +- .../InMemoryLogRecordExporter.swift | 7 +- .../Mocks/MockEmbraceOpenTelemetry.swift | 2 +- .../TestSupport/Mocks/MockSpanProcessor.swift | 7 +- .../SpanExporter/InMemorySpanExporter.swift | 10 +- Tuist/Package.resolved | 71 +++-- Tuist/Package.swift | 6 +- 86 files changed, 213 insertions(+), 526 deletions(-) delete mode 100644 Examples/BrandGame/BrandGame.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 Sources/EmbraceOTelInternal/Logs/Exporter/EmbraceLogRecordExporter.swift delete mode 100644 Sources/EmbraceOTelInternal/Logs/ReadableLogRecord.swift delete mode 100644 Sources/EmbraceOTelInternal/Trace/Tracer/OpenTelemetryTypes.swift delete mode 100644 Sources/EmbraceOTelInternal/Trace/Tracer/Span/Exporter/EmbraceSpanExporter.swift delete mode 100644 Sources/EmbraceOTelInternal/Trace/Tracer/Span/Processor/BatchSpanProcessor.swift delete mode 100644 Sources/EmbraceOTelInternal/Trace/Tracer/Span/Processor/EmbraceSpanProcessor.swift diff --git a/Examples/BombApp/BombApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/BombApp/BombApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index cbf4a399..07fa5563 100644 --- a/Examples/BombApp/BombApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Examples/BombApp/BombApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,4 +1,5 @@ { + "originHash" : "f35065f67c35655933e2b4ed841314daab70232fc79185162a3eea7fe1831c3b", "pins" : [ { "identity" : "abseil-cpp-binary", @@ -77,8 +78,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/groue/GRDB.swift", "state" : { - "revision" : "e83f3eb25ef4d5a36a13dbee98f8ac67e24e5c8f", - "version" : "6.16.0" + "revision" : "dd6b98ce04eda39aa22f066cd421c24d7236ea8a", + "version" : "6.29.1" } }, { @@ -149,8 +150,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/open-telemetry/opentelemetry-swift", "state" : { - "revision" : "37b52e2070cb925d98de30b51af6f0de91feae89", - "version" : "1.5.1" + "revision" : "0dd37c4a14a6aeeb131eea40a13cb3832c7c6a97", + "version" : "1.10.1" } }, { @@ -171,15 +172,6 @@ "version" : "2.4.0" } }, - { - "identity" : "reachability.swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/ashleymills/Reachability.swift", - "state" : { - "revision" : "7cbd73f46a7dfaeca079e18df7324c6de6d1834a", - "version" : "5.2.3" - } - }, { "identity" : "sourcekitten", "kind" : "remoteSourceControl", @@ -361,5 +353,5 @@ } } ], - "version" : 2 + "version" : 3 } diff --git a/Examples/BrandGame/BrandGame.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/BrandGame/BrandGame.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 50a2ce82..00000000 --- a/Examples/BrandGame/BrandGame.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,257 +0,0 @@ -{ - "pins" : [ - { - "identity" : "collectionconcurrencykit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/JohnSundell/CollectionConcurrencyKit.git", - "state" : { - "revision" : "b4f23e24b5a1bff301efc5e70871083ca029ff95", - "version" : "0.2.0" - } - }, - { - "identity" : "cryptoswift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/krzyzanowskim/CryptoSwift.git", - "state" : { - "revision" : "32f641cf24fc7abc1c591a2025e9f2f572648b0f", - "version" : "1.7.2" - } - }, - { - "identity" : "grdb.swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/groue/GRDB.swift", - "state" : { - "revision" : "dd6b98ce04eda39aa22f066cd421c24d7236ea8a", - "version" : "6.29.1" - } - }, - { - "identity" : "grpc-swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/grpc/grpc-swift.git", - "state" : { - "revision" : "6a90b7e77e29f9bda6c2b3a4165a40d6c02cfda1", - "version" : "1.23.0" - } - }, - { - "identity" : "kscrash", - "kind" : "remoteSourceControl", - "location" : "https://github.com/embrace-io/KSCrash.git", - "state" : { - "revision" : "30df8d35f1cc8d0537d595c4b18ddc0eb2675511", - "version" : "2.0.2" - } - }, - { - "identity" : "opentelemetry-swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/open-telemetry/opentelemetry-swift", - "state" : { - "revision" : "37b52e2070cb925d98de30b51af6f0de91feae89", - "version" : "1.5.1" - } - }, - { - "identity" : "opentracing-objc", - "kind" : "remoteSourceControl", - "location" : "https://github.com/undefinedlabs/opentracing-objc", - "state" : { - "revision" : "18c1a35ca966236cee0c5a714a51a73ff33384c1", - "version" : "0.5.2" - } - }, - { - "identity" : "reachability.swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/ashleymills/Reachability.swift", - "state" : { - "revision" : "7cbd73f46a7dfaeca079e18df7324c6de6d1834a", - "version" : "5.2.3" - } - }, - { - "identity" : "sourcekitten", - "kind" : "remoteSourceControl", - "location" : "https://github.com/jpsim/SourceKitten.git", - "state" : { - "revision" : "b6dc09ee51dfb0c66e042d2328c017483a1a5d56", - "version" : "0.34.1" - } - }, - { - "identity" : "swift-argument-parser", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-argument-parser.git", - "state" : { - "revision" : "8f4d2753f0e4778c76d5f05ad16c74f707390531", - "version" : "1.2.3" - } - }, - { - "identity" : "swift-atomics", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-atomics.git", - "state" : { - "revision" : "cd142fd2f64be2100422d658e7411e39489da985", - "version" : "1.2.0" - } - }, - { - "identity" : "swift-collections", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-collections.git", - "state" : { - "revision" : "3d2dc41a01f9e49d84f0a3925fb858bed64f702d", - "version" : "1.1.2" - } - }, - { - "identity" : "swift-http-types", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-http-types", - "state" : { - "revision" : "1ddbea1ee34354a6a2532c60f98501c35ae8edfa", - "version" : "1.2.0" - } - }, - { - "identity" : "swift-log", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-log.git", - "state" : { - "revision" : "9cb486020ebf03bfa5b5df985387a14a98744537", - "version" : "1.6.1" - } - }, - { - "identity" : "swift-metrics", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-metrics.git", - "state" : { - "revision" : "e0165b53d49b413dd987526b641e05e246782685", - "version" : "2.5.0" - } - }, - { - "identity" : "swift-nio", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-nio.git", - "state" : { - "revision" : "fc79798d5a150d61361a27ce0c51169b889e23de", - "version" : "2.68.0" - } - }, - { - "identity" : "swift-nio-extras", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-nio-extras.git", - "state" : { - "revision" : "05c36b57453d23ea63785d58a7dbc7b70ba1745e", - "version" : "1.23.0" - } - }, - { - "identity" : "swift-nio-http2", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-nio-http2.git", - "state" : { - "revision" : "a0224f3d20438635dd59c9fcc593520d80d131d0", - "version" : "1.33.0" - } - }, - { - "identity" : "swift-nio-ssl", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-nio-ssl.git", - "state" : { - "revision" : "2b09805797f21c380f7dc9bedaab3157c5508efb", - "version" : "2.27.0" - } - }, - { - "identity" : "swift-nio-transport-services", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-nio-transport-services.git", - "state" : { - "revision" : "38ac8221dd20674682148d6451367f89c2652980", - "version" : "1.21.0" - } - }, - { - "identity" : "swift-protobuf", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-protobuf.git", - "state" : { - "revision" : "d57a5aecf24a25b32ec4a74be2f5d0a995a47c4b", - "version" : "1.27.0" - } - }, - { - "identity" : "swift-syntax", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-syntax.git", - "state" : { - "revision" : "74203046135342e4a4a627476dd6caf8b28fe11b", - "version" : "509.0.0" - } - }, - { - "identity" : "swift-system", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-system.git", - "state" : { - "revision" : "6a9e38e7bd22a3b8ba80bddf395623cf68f57807", - "version" : "1.3.1" - } - }, - { - "identity" : "swiftlint", - "kind" : "remoteSourceControl", - "location" : "https://github.com/realm/SwiftLint", - "state" : { - "revision" : "6d2e58271ebc14c37bf76d7c9f4082cc15bad718", - "version" : "0.53.0" - } - }, - { - "identity" : "swiftytexttable", - "kind" : "remoteSourceControl", - "location" : "https://github.com/scottrhoyt/SwiftyTextTable.git", - "state" : { - "revision" : "c6df6cf533d120716bff38f8ff9885e1ce2a4ac3", - "version" : "0.9.0" - } - }, - { - "identity" : "swxmlhash", - "kind" : "remoteSourceControl", - "location" : "https://github.com/drmohundro/SWXMLHash.git", - "state" : { - "revision" : "a853604c9e9a83ad9954c7e3d2a565273982471f", - "version" : "7.0.2" - } - }, - { - "identity" : "thrift-swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/undefinedlabs/Thrift-Swift", - "state" : { - "revision" : "18ff09e6b30e589ed38f90a1af23e193b8ecef8e", - "version" : "1.1.2" - } - }, - { - "identity" : "yams", - "kind" : "remoteSourceControl", - "location" : "https://github.com/jpsim/Yams.git", - "state" : { - "revision" : "3036ba9d69cf1fd04d433527bc339dc0dc75433d", - "version" : "5.1.3" - } - } - ], - "version" : 2 -} diff --git a/Examples/BrandGame/BrandGame/OpenTelemetry/Export/Log/StdoutLogExporter.swift b/Examples/BrandGame/BrandGame/OpenTelemetry/Export/Log/StdoutLogExporter.swift index acb81ca7..d65f3e83 100644 --- a/Examples/BrandGame/BrandGame/OpenTelemetry/Export/Log/StdoutLogExporter.swift +++ b/Examples/BrandGame/BrandGame/OpenTelemetry/Export/Log/StdoutLogExporter.swift @@ -12,7 +12,7 @@ class StdoutLogExporter: LogRecordExporter { self.isDebug = isDebug } - func export(logRecords: [OpenTelemetrySdk.ReadableLogRecord]) -> OpenTelemetrySdk.ExportResult { + func export(logRecords: [OpenTelemetrySdk.ReadableLogRecord], explicitTimeout: TimeInterval?) -> OpenTelemetrySdk.ExportResult { if isDebug { for logRecord in logRecords { print(String(repeating: "-", count: 40)) @@ -40,10 +40,10 @@ class StdoutLogExporter: LogRecordExporter { return .success } - func forceFlush() -> OpenTelemetrySdk.ExportResult { + func forceFlush(explicitTimeout: TimeInterval?) -> OpenTelemetrySdk.ExportResult { return .success } - func shutdown() { } + func shutdown(explicitTimeout: TimeInterval?) { } } diff --git a/Examples/BrandGame/BrandGame/View/Menu/Minigames/Reflex/ReflexGameModel.swift b/Examples/BrandGame/BrandGame/View/Menu/Minigames/Reflex/ReflexGameModel.swift index a3990cd3..fb1edc86 100644 --- a/Examples/BrandGame/BrandGame/View/Menu/Minigames/Reflex/ReflexGameModel.swift +++ b/Examples/BrandGame/BrandGame/View/Menu/Minigames/Reflex/ReflexGameModel.swift @@ -5,6 +5,8 @@ import Foundation import EmbraceCore import EmbraceOTelInternal +import OpenTelemetryApi +import OpenTelemetrySdk @Observable class ReflexGameModel { diff --git a/Examples/BrandGame/BrandGame/View/Menu/Minigames/Simon/SimonGameModel.swift b/Examples/BrandGame/BrandGame/View/Menu/Minigames/Simon/SimonGameModel.swift index a4db2fcd..1bca6ab2 100644 --- a/Examples/BrandGame/BrandGame/View/Menu/Minigames/Simon/SimonGameModel.swift +++ b/Examples/BrandGame/BrandGame/View/Menu/Minigames/Simon/SimonGameModel.swift @@ -3,9 +3,10 @@ // import Foundation - import EmbraceCore import EmbraceOTelInternal +import OpenTelemetryApi +import OpenTelemetrySdk @Observable class SimonGameModel { diff --git a/Examples/DemoObjectiveC/DemoObjectiveC.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Examples/DemoObjectiveC/DemoObjectiveC.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index adc29346..6bbb4070 100644 --- a/Examples/DemoObjectiveC/DemoObjectiveC.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Examples/DemoObjectiveC/DemoObjectiveC.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,4 +1,5 @@ { + "originHash" : "30bf3f1af4d312afac34bcff9ba35cc3f452c81988789fae8ce52c8747bfec81", "pins" : [ { "identity" : "collectionconcurrencykit", @@ -23,8 +24,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/groue/GRDB.swift", "state" : { - "revision" : "e83f3eb25ef4d5a36a13dbee98f8ac67e24e5c8f", - "version" : "6.16.0" + "revision" : "dd6b98ce04eda39aa22f066cd421c24d7236ea8a", + "version" : "6.29.1" } }, { @@ -50,8 +51,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/open-telemetry/opentelemetry-swift", "state" : { - "revision" : "37b52e2070cb925d98de30b51af6f0de91feae89", - "version" : "1.5.1" + "revision" : "0dd37c4a14a6aeeb131eea40a13cb3832c7c6a97", + "version" : "1.10.1" } }, { @@ -63,15 +64,6 @@ "version" : "0.5.2" } }, - { - "identity" : "reachability.swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/ashleymills/Reachability.swift", - "state" : { - "revision" : "7cbd73f46a7dfaeca079e18df7324c6de6d1834a", - "version" : "5.2.3" - } - }, { "identity" : "sourcekitten", "kind" : "remoteSourceControl", @@ -253,5 +245,5 @@ } } ], - "version" : 2 + "version" : 3 } diff --git a/Package.resolved b/Package.resolved index b2f8abf2..e36c03cf 100644 --- a/Package.resolved +++ b/Package.resolved @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/open-telemetry/opentelemetry-swift", "state" : { - "revision" : "37b52e2070cb925d98de30b51af6f0de91feae89", - "version" : "1.5.1" + "revision" : "0dd37c4a14a6aeeb131eea40a13cb3832c7c6a97", + "version" : "1.10.1" } }, { @@ -63,15 +63,6 @@ "version" : "0.5.2" } }, - { - "identity" : "reachability.swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/ashleymills/Reachability.swift", - "state" : { - "revision" : "7cbd73f46a7dfaeca079e18df7324c6de6d1834a", - "version" : "5.2.3" - } - }, { "identity" : "sourcekitten", "kind" : "remoteSourceControl", diff --git a/Package.swift b/Package.swift index 0f7138d9..ca804638 100644 --- a/Package.swift +++ b/Package.swift @@ -23,7 +23,7 @@ let package = Package( .library(name: "EmbraceCore", targets: ["EmbraceCore"]), .library(name: "EmbraceCrash", targets: ["EmbraceCrash"]), .library(name: "EmbraceCrashlyticsSupport", targets: ["EmbraceCrashlyticsSupport"]), - .library(name: "EmbraceSemantics", targets: ["EmbraceSemantics"]), + .library(name: "EmbraceSemantics", targets: ["EmbraceSemantics"]) ], dependencies: [ .package( @@ -32,7 +32,7 @@ let package = Package( ), .package( url: "https://github.com/open-telemetry/opentelemetry-swift", - exact: "1.5.1" + exact: "1.10.1" ), .package( url: "https://github.com/groue/GRDB.swift", @@ -45,7 +45,7 @@ let package = Package( .package( url: "https://github.com/apple/swift-docc-plugin", branch: "main" - ), + ) ], targets: [ // main target --------------------------------------------------------------- diff --git a/Sources/EmbraceCore/Capture/System/LowPowerMode/LowPowerModeCaptureService.swift b/Sources/EmbraceCore/Capture/System/LowPowerMode/LowPowerModeCaptureService.swift index 84a45014..64e6cd02 100644 --- a/Sources/EmbraceCore/Capture/System/LowPowerMode/LowPowerModeCaptureService.swift +++ b/Sources/EmbraceCore/Capture/System/LowPowerMode/LowPowerModeCaptureService.swift @@ -7,6 +7,7 @@ import EmbraceCaptureService import EmbraceCommonInternal import EmbraceOTelInternal import EmbraceSemantics +import OpenTelemetryApi /// Service that generates OpenTelemetry spans when the phone is running in low power mode. @objc(EMBLowPowerModeCaptureService) diff --git a/Sources/EmbraceCore/Capture/UX/Tap/TapCaptureService.swift b/Sources/EmbraceCore/Capture/UX/Tap/TapCaptureService.swift index eb1d4a61..2215f20a 100644 --- a/Sources/EmbraceCore/Capture/UX/Tap/TapCaptureService.swift +++ b/Sources/EmbraceCore/Capture/UX/Tap/TapCaptureService.swift @@ -7,6 +7,7 @@ import EmbraceCaptureService import EmbraceCommonInternal import EmbraceOTelInternal import EmbraceSemantics +import OpenTelemetryApi /// Service that generates OpenTelemetry span events for taps on the screen. /// Note that any taps done on a keyboard view will be automatically ignored. @@ -133,8 +134,7 @@ class UIWindowSendEventSwizzler: Swizzlable { var onEvent: ((UIEvent) -> Void)? func install() throws { - try swizzleInstanceMethod { originalImplementation in - return { [weak self] uiWindow, uiEvent -> Void in + try swizzleInstanceMethod { originalImplementation in { [weak self] uiWindow, uiEvent -> Void in self?.onEvent?(uiEvent) originalImplementation(uiWindow, UIWindowSendEventSwizzler.selector, uiEvent) } diff --git a/Sources/EmbraceCore/Capture/WebView/WebViewCaptureService.swift b/Sources/EmbraceCore/Capture/WebView/WebViewCaptureService.swift index 2590a7ab..8ddc2ba2 100644 --- a/Sources/EmbraceCore/Capture/WebView/WebViewCaptureService.swift +++ b/Sources/EmbraceCore/Capture/WebView/WebViewCaptureService.swift @@ -9,6 +9,7 @@ import EmbraceCommonInternal import EmbraceOTelInternal import EmbraceCaptureService import EmbraceSemantics +import OpenTelemetryApi /// Service that generates OpenTelemetry span events when a `WKWebView` loads an URL or throws an error. @objc(EMBWebViewCaptureService) diff --git a/Sources/EmbraceCore/Internal/Embrace+Setup.swift b/Sources/EmbraceCore/Internal/Embrace+Setup.swift index ac92cc5a..2d7fc559 100644 --- a/Sources/EmbraceCore/Internal/Embrace+Setup.swift +++ b/Sources/EmbraceCore/Internal/Embrace+Setup.swift @@ -8,6 +8,7 @@ import EmbraceOTelInternal import EmbraceStorageInternal import EmbraceUploadInternal import EmbraceObjCUtilsInternal +import OpenTelemetryApi extension Embrace { static func createStorage(options: Embrace.Options) throws -> EmbraceStorage { diff --git a/Sources/EmbraceCore/Internal/Logs/DefaultEmbraceLogSharedState.swift b/Sources/EmbraceCore/Internal/Logs/DefaultEmbraceLogSharedState.swift index 2bcbbd37..dc36aeac 100644 --- a/Sources/EmbraceCore/Internal/Logs/DefaultEmbraceLogSharedState.swift +++ b/Sources/EmbraceCore/Internal/Logs/DefaultEmbraceLogSharedState.swift @@ -5,15 +5,16 @@ import Foundation import EmbraceOTelInternal import EmbraceStorageInternal +import OpenTelemetrySdk class DefaultEmbraceLogSharedState: EmbraceLogSharedState { - let processors: [EmbraceLogRecordProcessor] + let processors: [LogRecordProcessor] let resourceProvider: EmbraceResourceProvider private(set) var config: any EmbraceLoggerConfig init( config: any EmbraceLoggerConfig, - processors: [EmbraceLogRecordProcessor], + processors: [LogRecordProcessor], resourceProvider: EmbraceResourceProvider ) { self.config = config @@ -30,9 +31,9 @@ extension DefaultEmbraceLogSharedState { static func create( storage: EmbraceStorage, controller: LogControllable, - exporter: EmbraceLogRecordExporter? = nil + exporter: LogRecordExporter? = nil ) -> DefaultEmbraceLogSharedState { - var exporters: [EmbraceLogRecordExporter] = [ + var exporters: [LogRecordExporter] = [ StorageEmbraceLogExporter( logBatcher: DefaultLogBatcher( repository: storage, diff --git a/Sources/EmbraceCore/Internal/Logs/Exporter/StorageEmbraceLogExporter.swift b/Sources/EmbraceCore/Internal/Logs/Exporter/StorageEmbraceLogExporter.swift index 41349999..4287ba67 100644 --- a/Sources/EmbraceCore/Internal/Logs/Exporter/StorageEmbraceLogExporter.swift +++ b/Sources/EmbraceCore/Internal/Logs/Exporter/StorageEmbraceLogExporter.swift @@ -7,8 +7,11 @@ import EmbraceCommonInternal import EmbraceOTelInternal import EmbraceStorageInternal import EmbraceSemantics +import OpenTelemetryApi +import OpenTelemetrySdk + +class StorageEmbraceLogExporter: LogRecordExporter { -class StorageEmbraceLogExporter: EmbraceLogRecordExporter { @ThreadSafe private(set) var state: State private let logBatcher: LogBatcher @@ -25,7 +28,7 @@ class StorageEmbraceLogExporter: EmbraceLogRecordExporter { self.validation = LogDataValidation(validators: validators) } - func export(logRecords: [ReadableLogRecord]) -> ExportResult { + func export(logRecords: [ReadableLogRecord], explicitTimeout: TimeInterval?) -> ExportResult { guard state == .active else { return .failure } @@ -43,13 +46,13 @@ class StorageEmbraceLogExporter: EmbraceLogRecordExporter { return .success } - func shutdown() { + func shutdown(explicitTimeout: TimeInterval?) { state = .inactive } /// Everything is always persisted on disk, so calling this method has no effect at all. /// - Returns: `ExportResult.success` - func forceFlush() -> ExportResult { + func forceFlush(explicitTimeout: TimeInterval?) -> ExportResult { .success } } @@ -62,7 +65,7 @@ private extension StorageEmbraceLogExporter { return .init(identifier: LogIdentifier(), processIdentifier: ProcessIdentifier.current, severity: originalLog.severity?.toLogSeverity() ?? .info, - body: originalLog.body ?? "", + body: originalLog.body?.description ?? "", attributes: embAttributes, timestamp: originalLog.timestamp) } @@ -87,6 +90,8 @@ private extension PersistableValue { self.init(value) case let .doubleArray(value): self.init(value) + default: + return nil } } } diff --git a/Sources/EmbraceCore/Internal/Logs/Exporter/Validation/LogDataValidation.swift b/Sources/EmbraceCore/Internal/Logs/Exporter/Validation/LogDataValidation.swift index b10ccb1b..cf360f0d 100644 --- a/Sources/EmbraceCore/Internal/Logs/Exporter/Validation/LogDataValidation.swift +++ b/Sources/EmbraceCore/Internal/Logs/Exporter/Validation/LogDataValidation.swift @@ -4,6 +4,7 @@ import Foundation import EmbraceOTelInternal +import OpenTelemetrySdk class LogDataValidation { diff --git a/Sources/EmbraceCore/Internal/Logs/Exporter/Validation/LogDataValidator.swift b/Sources/EmbraceCore/Internal/Logs/Exporter/Validation/LogDataValidator.swift index 3e0a3c30..895d5091 100644 --- a/Sources/EmbraceCore/Internal/Logs/Exporter/Validation/LogDataValidator.swift +++ b/Sources/EmbraceCore/Internal/Logs/Exporter/Validation/LogDataValidator.swift @@ -4,6 +4,7 @@ import Foundation import EmbraceOTelInternal +import OpenTelemetrySdk protocol LogDataValidator { diff --git a/Sources/EmbraceCore/Internal/Logs/Exporter/Validation/Validators/LengthOfBodyValidator.swift b/Sources/EmbraceCore/Internal/Logs/Exporter/Validation/Validators/LengthOfBodyValidator.swift index 19f6b8d6..6e59a7f2 100644 --- a/Sources/EmbraceCore/Internal/Logs/Exporter/Validation/Validators/LengthOfBodyValidator.swift +++ b/Sources/EmbraceCore/Internal/Logs/Exporter/Validation/Validators/LengthOfBodyValidator.swift @@ -4,6 +4,7 @@ import Foundation import EmbraceOTelInternal +import OpenTelemetrySdk /// Validates the length of ``ReadableLogRecord.body``. /// This compares the length of the String in characters, not bytes. @@ -20,6 +21,6 @@ class LengthOfBodyValidator: LogDataValidator { guard let body = data.body else { return false } - return allowedCharacterCount.contains(body.count) + return allowedCharacterCount.contains(body.description.count) } } diff --git a/Sources/EmbraceCore/Internal/ResourceStorageExporter/ResourceStorageExporter.swift b/Sources/EmbraceCore/Internal/ResourceStorageExporter/ResourceStorageExporter.swift index a1351482..d6b46d17 100644 --- a/Sources/EmbraceCore/Internal/ResourceStorageExporter/ResourceStorageExporter.swift +++ b/Sources/EmbraceCore/Internal/ResourceStorageExporter/ResourceStorageExporter.swift @@ -5,6 +5,8 @@ import Foundation import EmbraceStorageInternal import EmbraceOTelInternal +import OpenTelemetryApi +import OpenTelemetrySdk class ConcreteEmbraceResource: EmbraceResource { var key: String diff --git a/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/SpanDataValidation.swift b/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/SpanDataValidation.swift index eb87eaf6..58fb146b 100644 --- a/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/SpanDataValidation.swift +++ b/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/SpanDataValidation.swift @@ -4,6 +4,7 @@ import Foundation import EmbraceOTelInternal +import OpenTelemetrySdk class SpanDataValidation { diff --git a/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/SpanDataValidator.swift b/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/SpanDataValidator.swift index 7782a060..90a96915 100644 --- a/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/SpanDataValidator.swift +++ b/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/SpanDataValidator.swift @@ -4,9 +4,8 @@ import Foundation import EmbraceOTelInternal +import OpenTelemetrySdk protocol SpanDataValidator { - func validate(data: inout SpanData) -> Bool - } diff --git a/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/Validators/LengthOfNameValidator.swift b/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/Validators/LengthOfNameValidator.swift index fbcb8799..ee4d9f97 100644 --- a/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/Validators/LengthOfNameValidator.swift +++ b/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/Validators/LengthOfNameValidator.swift @@ -4,6 +4,7 @@ import EmbraceOTelInternal import EmbraceSemantics +import OpenTelemetrySdk /// Validates the length of ``SpanData.name``. /// This compares the length of the String in characters, not bytes. diff --git a/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/Validators/WhitespaceSpanNameValidator.swift b/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/Validators/WhitespaceSpanNameValidator.swift index aa25995e..98b7564c 100644 --- a/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/Validators/WhitespaceSpanNameValidator.swift +++ b/Sources/EmbraceCore/Internal/SpanStorageExporter/Validation/Validators/WhitespaceSpanNameValidator.swift @@ -4,6 +4,7 @@ import Foundation import EmbraceOTelInternal +import OpenTelemetrySdk class WhitespaceSpanNameValidator: SpanDataValidator { func validate(data: inout SpanData) -> Bool { diff --git a/Sources/EmbraceCore/Internal/Tracing/EmbraceSpanProcessor+Setup.swift b/Sources/EmbraceCore/Internal/Tracing/EmbraceSpanProcessor+Setup.swift index 794f0c86..e2fb217e 100644 --- a/Sources/EmbraceCore/Internal/Tracing/EmbraceSpanProcessor+Setup.swift +++ b/Sources/EmbraceCore/Internal/Tracing/EmbraceSpanProcessor+Setup.swift @@ -5,6 +5,7 @@ import Foundation import EmbraceOTelInternal import EmbraceStorageInternal +import OpenTelemetrySdk extension Collection where Element == SpanProcessor { static func processors(for storage: EmbraceStorage, export: OpenTelemetryExport?) -> [SpanProcessor] { diff --git a/Sources/EmbraceCore/Internal/Tracing/StorageSpanExporter.swift b/Sources/EmbraceCore/Internal/Tracing/StorageSpanExporter.swift index 1972a819..be122172 100644 --- a/Sources/EmbraceCore/Internal/Tracing/StorageSpanExporter.swift +++ b/Sources/EmbraceCore/Internal/Tracing/StorageSpanExporter.swift @@ -2,11 +2,14 @@ // Copyright © 2024 Embrace Mobile, Inc. All rights reserved. // +import Foundation import EmbraceStorageInternal import EmbraceOTelInternal import EmbraceCommonInternal +import OpenTelemetrySdk + +class StorageSpanExporter: SpanExporter { -class StorageSpanExporter: EmbraceSpanExporter { private(set) weak var storage: EmbraceStorage? private weak var logger: InternalLogger? @@ -18,7 +21,7 @@ class StorageSpanExporter: EmbraceSpanExporter { self.logger = logger } - @discardableResult public func export(spans: [SpanData]) -> SpanExporterResultCode { + @discardableResult public func export(spans: [SpanData], explicitTimeout: TimeInterval?) -> SpanExporterResultCode { guard let storage = storage else { return .failure } @@ -42,12 +45,12 @@ class StorageSpanExporter: EmbraceSpanExporter { return result } - public func flush() -> SpanExporterResultCode { + public func flush(explicitTimeout: TimeInterval?) -> SpanExporterResultCode { // TODO: do we need to make sure storage writes are finished? return .success } - public func shutdown() { + public func shutdown(explicitTimeout: TimeInterval?) { _ = flush() } diff --git a/Sources/EmbraceCore/Payload/Builders/SpansPayloadBuilder.swift b/Sources/EmbraceCore/Payload/Builders/SpansPayloadBuilder.swift index 0c554511..4fef2903 100644 --- a/Sources/EmbraceCore/Payload/Builders/SpansPayloadBuilder.swift +++ b/Sources/EmbraceCore/Payload/Builders/SpansPayloadBuilder.swift @@ -6,6 +6,7 @@ import Foundation import EmbraceCommonInternal import EmbraceStorageInternal import EmbraceOTelInternal +import OpenTelemetrySdk class SpansPayloadBuilder { diff --git a/Sources/EmbraceCore/Payload/Spans/SpanPayload.swift b/Sources/EmbraceCore/Payload/Spans/SpanPayload.swift index 388164bf..dfa498b3 100644 --- a/Sources/EmbraceCore/Payload/Spans/SpanPayload.swift +++ b/Sources/EmbraceCore/Payload/Spans/SpanPayload.swift @@ -5,6 +5,7 @@ import Foundation import EmbraceOTelInternal import EmbraceSemantics +import OpenTelemetrySdk struct SpanPayload: Encodable { let traceId: String diff --git a/Sources/EmbraceCore/Public/Embrace+CrashReporter.swift b/Sources/EmbraceCore/Public/Embrace+CrashReporter.swift index f443bc0a..ae2cdf3c 100644 --- a/Sources/EmbraceCore/Public/Embrace+CrashReporter.swift +++ b/Sources/EmbraceCore/Public/Embrace+CrashReporter.swift @@ -50,7 +50,7 @@ extension Embrace { /// - Parameters: /// - key: The key for the attribute. /// - value: The value associated with the given key. - @objc public func appendCrashInfo(key: String, value: String) throws { + public func appendCrashInfo(key: String, value: String) throws { guard let crashRporter = captureServices.crashReporter else { throw EmbraceCrashReportError.noCrashReporterAvailable } @@ -63,7 +63,7 @@ extension Embrace { } /// Returns the last run end state. - @objc public func lastRunEndState() -> LastRunEndState { + public func lastRunEndState() -> LastRunEndState { guard let crashReporterEndState = captureServices.crashReporter?.getLastRunState() else { return .unavailable } diff --git a/Sources/EmbraceCore/Public/Embrace+OTel.swift b/Sources/EmbraceCore/Public/Embrace+OTel.swift index 97e68b42..e30d7921 100644 --- a/Sources/EmbraceCore/Public/Embrace+OTel.swift +++ b/Sources/EmbraceCore/Public/Embrace+OTel.swift @@ -6,9 +6,11 @@ import Foundation import EmbraceCommonInternal import EmbraceOTelInternal import EmbraceSemantics +import OpenTelemetryApi +import OpenTelemetrySdk extension Embrace: EmbraceOpenTelemetry { - private var exporter: EmbraceSpanExporter { + private var exporter: SpanExporter { StorageSpanExporter( options: .init(storage: storage), logger: Embrace.logger @@ -98,7 +100,7 @@ extension Embrace: EmbraceOpenTelemetry { /// - Parameter span: A `Span` object that implements `ReadableSpan` public func flush(_ span: Span) { if let span = span as? ReadableSpan { - exporter.export(spans: [span.toSpanData()]) + _ = exporter.export(spans: [span.toSpanData()]) } else { Embrace.logger.debug("Tried to flush a non-ReadableSpan object") } diff --git a/Sources/EmbraceCore/Public/Events/Breadcrumb.swift b/Sources/EmbraceCore/Public/Events/Breadcrumb.swift index 71e461af..799b9328 100644 --- a/Sources/EmbraceCore/Public/Events/Breadcrumb.swift +++ b/Sources/EmbraceCore/Public/Events/Breadcrumb.swift @@ -6,6 +6,7 @@ import Foundation import EmbraceOTelInternal import EmbraceCommonInternal import EmbraceSemantics +import OpenTelemetryApi /// Class used to represent a Breadcrum as a SpanEvent. /// Usage example: diff --git a/Sources/EmbraceCore/Public/PushNotifications/PushNotificationEvent.swift b/Sources/EmbraceCore/Public/PushNotifications/PushNotificationEvent.swift index a4930104..0baa6481 100644 --- a/Sources/EmbraceCore/Public/PushNotifications/PushNotificationEvent.swift +++ b/Sources/EmbraceCore/Public/PushNotifications/PushNotificationEvent.swift @@ -7,6 +7,7 @@ import UserNotifications import EmbraceOTelInternal import EmbraceCommonInternal import EmbraceSemantics +import OpenTelemetryApi /// Class used to represent a Push Notification as a SpanEvent. /// Usage example: diff --git a/Sources/EmbraceCore/Session/SessionController.swift b/Sources/EmbraceCore/Session/SessionController.swift index 55c127d5..b61647e2 100644 --- a/Sources/EmbraceCore/Session/SessionController.swift +++ b/Sources/EmbraceCore/Session/SessionController.swift @@ -7,6 +7,7 @@ import EmbraceCommonInternal import EmbraceStorageInternal import EmbraceUploadInternal import EmbraceOTelInternal +import OpenTelemetryApi public extension Notification.Name { static let embraceSessionDidStart = Notification.Name("embrace.session.did_start") diff --git a/Sources/EmbraceCore/Session/SessionSpanUtils.swift b/Sources/EmbraceCore/Session/SessionSpanUtils.swift index 628b97e9..18496521 100644 --- a/Sources/EmbraceCore/Session/SessionSpanUtils.swift +++ b/Sources/EmbraceCore/Session/SessionSpanUtils.swift @@ -8,6 +8,7 @@ import EmbraceStorageInternal import EmbraceOTelInternal import EmbraceSemantics import OpenTelemetryApi +import OpenTelemetrySdk struct SessionSpanUtils { diff --git a/Sources/EmbraceCore/Utils/NSObject+Embrace.swift b/Sources/EmbraceCore/Utils/NSObject+Embrace.swift index 1b1e804f..c98391d6 100644 --- a/Sources/EmbraceCore/Utils/NSObject+Embrace.swift +++ b/Sources/EmbraceCore/Utils/NSObject+Embrace.swift @@ -4,6 +4,7 @@ import Foundation import EmbraceOTelInternal +import OpenTelemetryApi extension NSObject { private struct AssociatedKeys { diff --git a/Sources/EmbraceCore/Utils/W3C/W3C+TraceParent.swift b/Sources/EmbraceCore/Utils/W3C/W3C+TraceParent.swift index 58d2942a..fdc5c304 100644 --- a/Sources/EmbraceCore/Utils/W3C/W3C+TraceParent.swift +++ b/Sources/EmbraceCore/Utils/W3C/W3C+TraceParent.swift @@ -3,6 +3,7 @@ // import EmbraceOTelInternal +import OpenTelemetryApi public extension W3C { static let traceparentHeaderName = "traceparent" diff --git a/Sources/EmbraceIO/Options/Options+CaptureService.swift b/Sources/EmbraceIO/Options/Options+CaptureService.swift index 311e87fa..02344297 100644 --- a/Sources/EmbraceIO/Options/Options+CaptureService.swift +++ b/Sources/EmbraceIO/Options/Options+CaptureService.swift @@ -69,7 +69,7 @@ public extension Embrace.Options { } /// Initializer for `Embrace.Options` that does not require an appId. - + /// Use this initializer if you don't want the SDK to send data to Embrace's servers. /// You must provide your own `OpenTelemetryExport` /// diff --git a/Sources/EmbraceOTelInternal/EmbraceOTel.swift b/Sources/EmbraceOTelInternal/EmbraceOTel.swift index dd75b792..d9b80986 100644 --- a/Sources/EmbraceOTelInternal/EmbraceOTel.swift +++ b/Sources/EmbraceOTelInternal/EmbraceOTel.swift @@ -107,7 +107,7 @@ public final class EmbraceOTel: NSObject { } logger .logRecordBuilder() - .setBody(message) + .setBody(.string(message)) .setTimestamp(timestamp) .setAttributes(otelAttributes) .setSeverity(Severity.fromLogSeverity(severity) ?? .info) diff --git a/Sources/EmbraceOTelInternal/Logs/EmbraceLogRecordBuilder.swift b/Sources/EmbraceOTelInternal/Logs/EmbraceLogRecordBuilder.swift index a7874ca6..84a34c78 100644 --- a/Sources/EmbraceOTelInternal/Logs/EmbraceLogRecordBuilder.swift +++ b/Sources/EmbraceOTelInternal/Logs/EmbraceLogRecordBuilder.swift @@ -7,6 +7,7 @@ import OpenTelemetrySdk import Foundation class EmbraceLogRecordBuilder: EventBuilder { + let sharedState: EmbraceLogSharedState let instrumentationScope: InstrumentationScopeInfo @@ -14,7 +15,7 @@ class EmbraceLogRecordBuilder: EventBuilder { private(set) var observedTimestamp: Date? private(set) var severity: Severity? private(set) var spanContext: SpanContext? - private(set) var body: String? + private(set) var body: AttributeValue? private(set) var attributes: [String: AttributeValue] init(sharedState: EmbraceLogSharedState, attributes: [String: AttributeValue]) { @@ -43,7 +44,7 @@ class EmbraceLogRecordBuilder: EventBuilder { return self } - func setBody(_ body: String) -> Self { + func setBody(_ body: AttributeValue) -> Self { self.body = body return self } @@ -55,6 +56,10 @@ class EmbraceLogRecordBuilder: EventBuilder { return self } + func setData(_ attributes: [String: OpenTelemetryApi.AttributeValue]) -> Self { + return setAttributes(attributes) + } + func emit() { let resource = sharedState.resourceProvider.getResource() diff --git a/Sources/EmbraceOTelInternal/Logs/EmbraceLoggerSharedState.swift b/Sources/EmbraceOTelInternal/Logs/EmbraceLoggerSharedState.swift index a8897643..d57ecf55 100644 --- a/Sources/EmbraceOTelInternal/Logs/EmbraceLoggerSharedState.swift +++ b/Sources/EmbraceOTelInternal/Logs/EmbraceLoggerSharedState.swift @@ -7,7 +7,7 @@ import OpenTelemetrySdk import Foundation public protocol EmbraceLogSharedState { - var processors: [EmbraceLogRecordProcessor] { get } + var processors: [LogRecordProcessor] { get } var config: any EmbraceLoggerConfig { get } var resourceProvider: EmbraceResourceProvider { get } diff --git a/Sources/EmbraceOTelInternal/Logs/EmbraceSemantics/LogRecord+Embrace.swift b/Sources/EmbraceOTelInternal/Logs/EmbraceSemantics/LogRecord+Embrace.swift index 4eef9c5d..0f1aac16 100644 --- a/Sources/EmbraceOTelInternal/Logs/EmbraceSemantics/LogRecord+Embrace.swift +++ b/Sources/EmbraceOTelInternal/Logs/EmbraceSemantics/LogRecord+Embrace.swift @@ -4,6 +4,7 @@ import EmbraceSemantics import EmbraceCommonInternal +import OpenTelemetrySdk extension ReadableLogRecord { public var embType: LogType? { diff --git a/Sources/EmbraceOTelInternal/Logs/Exporter/EmbraceLogRecordExporter.swift b/Sources/EmbraceOTelInternal/Logs/Exporter/EmbraceLogRecordExporter.swift deleted file mode 100644 index e34f1d48..00000000 --- a/Sources/EmbraceOTelInternal/Logs/Exporter/EmbraceLogRecordExporter.swift +++ /dev/null @@ -1,9 +0,0 @@ -// -// Copyright © 2024 Embrace Mobile, Inc. All rights reserved. -// - -import Foundation -import OpenTelemetrySdk - -public typealias EmbraceLogRecordExporter = OpenTelemetrySdk.LogRecordExporter -public typealias ExportResult = OpenTelemetrySdk.ExportResult diff --git a/Sources/EmbraceOTelInternal/Logs/Processors/EmbraceLogRecordProcessor.swift b/Sources/EmbraceOTelInternal/Logs/Processors/EmbraceLogRecordProcessor.swift index f652fc0d..d7964ec6 100644 --- a/Sources/EmbraceOTelInternal/Logs/Processors/EmbraceLogRecordProcessor.swift +++ b/Sources/EmbraceOTelInternal/Logs/Processors/EmbraceLogRecordProcessor.swift @@ -3,12 +3,11 @@ // import OpenTelemetrySdk -public typealias EmbraceLogRecordProcessor = LogRecordProcessor -public extension Array where Element == any EmbraceLogRecordProcessor { +public extension Array where Element == any LogRecordProcessor { static func `default`( - withExporters exporters: [EmbraceLogRecordExporter] - ) -> [EmbraceLogRecordProcessor] { + withExporters exporters: [LogRecordExporter] + ) -> [LogRecordProcessor] { [SingleLogRecordProcessor(exporters: exporters)] } } diff --git a/Sources/EmbraceOTelInternal/Logs/Processors/SingleLogRecordProcessor.swift b/Sources/EmbraceOTelInternal/Logs/Processors/SingleLogRecordProcessor.swift index 39467d61..9549b200 100644 --- a/Sources/EmbraceOTelInternal/Logs/Processors/SingleLogRecordProcessor.swift +++ b/Sources/EmbraceOTelInternal/Logs/Processors/SingleLogRecordProcessor.swift @@ -5,10 +5,11 @@ import Foundation import OpenTelemetrySdk -class SingleLogRecordProcessor: EmbraceLogRecordProcessor { - private let exporters: [EmbraceLogRecordExporter] +class SingleLogRecordProcessor: LogRecordProcessor { - init(exporters: [EmbraceLogRecordExporter]) { + private let exporters: [LogRecordExporter] + + init(exporters: [LogRecordExporter]) { self.exporters = exporters } @@ -18,7 +19,7 @@ class SingleLogRecordProcessor: EmbraceLogRecordProcessor { } } - func forceFlush() -> ExportResult { + func forceFlush(explicitTimeout: TimeInterval?) -> ExportResult { let resultSet = Set(exporters.map { $0.forceFlush() }) if let firstResult = resultSet.first { return resultSet.count > 1 ? .failure : firstResult @@ -26,7 +27,7 @@ class SingleLogRecordProcessor: EmbraceLogRecordProcessor { return .success } - func shutdown() -> ExportResult { + func shutdown(explicitTimeout: TimeInterval?) -> ExportResult { exporters.forEach { $0.shutdown() } return .success } diff --git a/Sources/EmbraceOTelInternal/Logs/ReadableLogRecord.swift b/Sources/EmbraceOTelInternal/Logs/ReadableLogRecord.swift deleted file mode 100644 index e6177904..00000000 --- a/Sources/EmbraceOTelInternal/Logs/ReadableLogRecord.swift +++ /dev/null @@ -1,8 +0,0 @@ -// -// Copyright © 2024 Embrace Mobile, Inc. All rights reserved. -// - -import Foundation -import OpenTelemetrySdk - -public typealias ReadableLogRecord = OpenTelemetrySdk.ReadableLogRecord diff --git a/Sources/EmbraceOTelInternal/Shared/EmbraceResource.swift b/Sources/EmbraceOTelInternal/Shared/EmbraceResource.swift index f350dfd4..df51ab2b 100644 --- a/Sources/EmbraceOTelInternal/Shared/EmbraceResource.swift +++ b/Sources/EmbraceOTelInternal/Shared/EmbraceResource.swift @@ -6,8 +6,6 @@ import Foundation import OpenTelemetryApi import OpenTelemetrySdk -public typealias Resource = OpenTelemetrySdk.Resource - /// Typealias created to abstract away the `AttributeValue` from `OpenTelemetryApi`, /// reducing the dependency exposure to dependents. public typealias ResourceValue = AttributeValue diff --git a/Sources/EmbraceOTelInternal/Shared/EmbraceResourceProvider.swift b/Sources/EmbraceOTelInternal/Shared/EmbraceResourceProvider.swift index 54de0cb6..b51ebe7c 100644 --- a/Sources/EmbraceOTelInternal/Shared/EmbraceResourceProvider.swift +++ b/Sources/EmbraceOTelInternal/Shared/EmbraceResourceProvider.swift @@ -11,4 +11,3 @@ import OpenTelemetrySdk public protocol EmbraceResourceProvider { func getResource() -> Resource } - diff --git a/Sources/EmbraceOTelInternal/Trace/Tracer/OpenTelemetryTypes.swift b/Sources/EmbraceOTelInternal/Trace/Tracer/OpenTelemetryTypes.swift deleted file mode 100644 index c19058f3..00000000 --- a/Sources/EmbraceOTelInternal/Trace/Tracer/OpenTelemetryTypes.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Copyright © 2024 Embrace Mobile, Inc. All rights reserved. -// - -import OpenTelemetryApi -import OpenTelemetrySdk - -// API -public typealias Tracer = OpenTelemetryApi.Tracer - -public typealias TraceId = OpenTelemetryApi.TraceId - -public typealias SpanId = OpenTelemetryApi.SpanId - -public typealias SpanContext = OpenTelemetryApi.SpanContext - -public typealias TraceFlags = OpenTelemetryApi.TraceFlags - -public typealias TraceState = OpenTelemetryApi.TraceState - -public typealias Span=OpenTelemetryApi.Span - -public typealias Status=OpenTelemetryApi.Status - -public typealias SpanBuilder=OpenTelemetryApi.SpanBuilder - -public typealias AttributeValue=OpenTelemetryApi.AttributeValue - -// SDK -public typealias SpanData = OpenTelemetrySdk.SpanData - -public typealias ReadableSpan = OpenTelemetrySdk.ReadableSpan - -public typealias SpanExporterResultCode = OpenTelemetrySdk.SpanExporterResultCode - -public typealias SpanProcessor = OpenTelemetrySdk.SpanProcessor - -public typealias ResourceAttributes=OpenTelemetrySdk.ResourceAttributes diff --git a/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Exporter/EmbraceSpanExporter.swift b/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Exporter/EmbraceSpanExporter.swift deleted file mode 100644 index c8d5ea72..00000000 --- a/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Exporter/EmbraceSpanExporter.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// Copyright © 2024 Embrace Mobile, Inc. All rights reserved. -// - -import Foundation -import OpenTelemetrySdk - -public protocol EmbraceSpanExporter: SpanExporter { - -} diff --git a/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Processor/BatchSpanProcessor.swift b/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Processor/BatchSpanProcessor.swift deleted file mode 100644 index 4425e620..00000000 --- a/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Processor/BatchSpanProcessor.swift +++ /dev/null @@ -1,7 +0,0 @@ -// -// Copyright © 2024 Embrace Mobile, Inc. All rights reserved. -// - -import OpenTelemetrySdk - -public typealias BatchSpanProcessor = OpenTelemetrySdk.BatchSpanProcessor diff --git a/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Processor/EmbraceSpanProcessor.swift b/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Processor/EmbraceSpanProcessor.swift deleted file mode 100644 index 4ea63c92..00000000 --- a/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Processor/EmbraceSpanProcessor.swift +++ /dev/null @@ -1,9 +0,0 @@ -// -// Copyright © 2024 Embrace Mobile, Inc. All rights reserved. -// - -import OpenTelemetrySdk - -public protocol EmbraceSpanProcessor: SpanProcessor { - -} diff --git a/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Processor/SingleSpanProcessor.swift b/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Processor/SingleSpanProcessor.swift index afcfc2f8..1bf74fc7 100644 --- a/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Processor/SingleSpanProcessor.swift +++ b/Sources/EmbraceOTelInternal/Trace/Tracer/Span/Processor/SingleSpanProcessor.swift @@ -8,7 +8,7 @@ import OpenTelemetrySdk /// A really simple implementation of the SpanProcessor that converts the ExportableSpan to SpanData /// and passes it to the configured exporter in both `onStart` and `onEnd` -public struct SingleSpanProcessor: EmbraceSpanProcessor { +public struct SingleSpanProcessor: SpanProcessor { let spanExporter: SpanExporter private let processorQueue = DispatchQueue(label: "io.embrace.spanprocessor", qos: .utility) @@ -30,7 +30,7 @@ public struct SingleSpanProcessor: EmbraceSpanProcessor { let data = span.toSpanData() processorQueue.async { - exporter.export(spans: [data]) + _ = exporter.export(spans: [data]) } } @@ -47,7 +47,7 @@ public struct SingleSpanProcessor: EmbraceSpanProcessor { } processorQueue.async { - exporter.export(spans: [data]) + _ = exporter.export(spans: [data]) } } @@ -55,10 +55,9 @@ public struct SingleSpanProcessor: EmbraceSpanProcessor { _ = processorQueue.sync { spanExporter.flush() } } - public func shutdown() { + public func shutdown(explicitTimeout: TimeInterval?) { processorQueue.sync { spanExporter.shutdown() } } - } diff --git a/Sources/EmbraceOTelInternal/Trace/Tracer/Span/SpanEvent.swift b/Sources/EmbraceOTelInternal/Trace/Tracer/Span/SpanEvent.swift index 2c7fcfd8..687ce565 100644 --- a/Sources/EmbraceOTelInternal/Trace/Tracer/Span/SpanEvent.swift +++ b/Sources/EmbraceOTelInternal/Trace/Tracer/Span/SpanEvent.swift @@ -4,6 +4,7 @@ import Foundation import OpenTelemetryApi +import OpenTelemetrySdk public protocol SpanEvent { var name: String { get } diff --git a/Sources/EmbraceOTelInternal/Trace/Tracer/Span/SpanLink.swift b/Sources/EmbraceOTelInternal/Trace/Tracer/Span/SpanLink.swift index 8481a2e7..117382e9 100644 --- a/Sources/EmbraceOTelInternal/Trace/Tracer/Span/SpanLink.swift +++ b/Sources/EmbraceOTelInternal/Trace/Tracer/Span/SpanLink.swift @@ -2,6 +2,9 @@ // Copyright © 2024 Embrace Mobile, Inc. All rights reserved. // +import OpenTelemetryApi +import OpenTelemetrySdk + public protocol SpanLink { var context: SpanContext { get } var attributes: [String: AttributeValue] { get } diff --git a/Tests/EmbraceCoreTests/Capture/Network/DefaultURLSessionTaskHandlerTests.swift b/Tests/EmbraceCoreTests/Capture/Network/DefaultURLSessionTaskHandlerTests.swift index 8301603f..d8dcd611 100644 --- a/Tests/EmbraceCoreTests/Capture/Network/DefaultURLSessionTaskHandlerTests.swift +++ b/Tests/EmbraceCoreTests/Capture/Network/DefaultURLSessionTaskHandlerTests.swift @@ -8,6 +8,7 @@ import TestSupport import EmbraceCommonInternal import EmbraceOTelInternal @testable import EmbraceCore +import OpenTelemetrySdk // swiftlint:disable line_length diff --git a/Tests/EmbraceCoreTests/Capture/System/LowPowerModeCaptureServiceTests.swift b/Tests/EmbraceCoreTests/Capture/System/LowPowerModeCaptureServiceTests.swift index 98f1f716..9d559a76 100644 --- a/Tests/EmbraceCoreTests/Capture/System/LowPowerModeCaptureServiceTests.swift +++ b/Tests/EmbraceCoreTests/Capture/System/LowPowerModeCaptureServiceTests.swift @@ -6,6 +6,7 @@ import XCTest import TestSupport import EmbraceCommonInternal import OpenTelemetryApi +import OpenTelemetrySdk @testable import EmbraceOTelInternal @testable import EmbraceCore diff --git a/Tests/EmbraceCoreTests/IntegrationTests/EmbraceIntegrationTests.swift b/Tests/EmbraceCoreTests/IntegrationTests/EmbraceIntegrationTests.swift index aa2da20f..9a92bb8b 100644 --- a/Tests/EmbraceCoreTests/IntegrationTests/EmbraceIntegrationTests.swift +++ b/Tests/EmbraceCoreTests/IntegrationTests/EmbraceIntegrationTests.swift @@ -8,6 +8,7 @@ import EmbraceStorageInternal import EmbraceOTelInternal import GRDB import TestSupport +import OpenTelemetrySdk final class EmbraceIntegrationTests: IntegrationTestCase { diff --git a/Tests/EmbraceCoreTests/Internal/DefaultInternalLoggerTests.swift b/Tests/EmbraceCoreTests/Internal/DefaultInternalLoggerTests.swift index d753650d..ce496201 100644 --- a/Tests/EmbraceCoreTests/Internal/DefaultInternalLoggerTests.swift +++ b/Tests/EmbraceCoreTests/Internal/DefaultInternalLoggerTests.swift @@ -6,6 +6,7 @@ import XCTest @testable import EmbraceCore import TestSupport import EmbraceStorageInternal +import OpenTelemetryApi class DefaultInternalLoggerTests: XCTestCase { @@ -107,7 +108,7 @@ class DefaultInternalLoggerTests: XCTestCase { XCTAssertEqual(otel.logs[0].attributes["emb.type"], .string("sys.internal")) XCTAssertEqual(otel.logs[0].attributes["emb.state"], .string("foreground")) XCTAssertEqual(otel.logs[0].attributes["emb.session_id"], .string(TestConstants.sessionId.toString)) - XCTAssertEqual(otel.logs[0].body, "trace1") + XCTAssertEqual(otel.logs[0].body?.description, "trace1") XCTAssertEqual(otel.logs[0].severity, .trace) } @@ -134,7 +135,7 @@ class DefaultInternalLoggerTests: XCTestCase { XCTAssertEqual(otel.logs[0].attributes["emb.type"], .string("sys.internal")) XCTAssertEqual(otel.logs[0].attributes["emb.state"], .string("foreground")) XCTAssertEqual(otel.logs[0].attributes["emb.session_id"], .string(TestConstants.sessionId.toString)) - XCTAssertEqual(otel.logs[0].body, "debug1") + XCTAssertEqual(otel.logs[0].body?.description, "debug1") XCTAssertEqual(otel.logs[0].severity, .debug) } @@ -161,7 +162,7 @@ class DefaultInternalLoggerTests: XCTestCase { XCTAssertEqual(otel.logs[0].attributes["emb.type"], .string("sys.internal")) XCTAssertEqual(otel.logs[0].attributes["emb.state"], .string("foreground")) XCTAssertEqual(otel.logs[0].attributes["emb.session_id"], .string(TestConstants.sessionId.toString)) - XCTAssertEqual(otel.logs[0].body, "info1") + XCTAssertEqual(otel.logs[0].body?.description, "info1") XCTAssertEqual(otel.logs[0].severity, .info) } @@ -188,7 +189,7 @@ class DefaultInternalLoggerTests: XCTestCase { XCTAssertEqual(otel.logs[0].attributes["emb.type"], .string("sys.internal")) XCTAssertEqual(otel.logs[0].attributes["emb.state"], .string("foreground")) XCTAssertEqual(otel.logs[0].attributes["emb.session_id"], .string(TestConstants.sessionId.toString)) - XCTAssertEqual(otel.logs[0].body, "warning1") + XCTAssertEqual(otel.logs[0].body?.description, "warning1") XCTAssertEqual(otel.logs[0].severity, .warn) } @@ -215,7 +216,7 @@ class DefaultInternalLoggerTests: XCTestCase { XCTAssertEqual(otel.logs[0].attributes["emb.type"], .string("sys.internal")) XCTAssertEqual(otel.logs[0].attributes["emb.state"], .string("foreground")) XCTAssertEqual(otel.logs[0].attributes["emb.session_id"], .string(TestConstants.sessionId.toString)) - XCTAssertEqual(otel.logs[0].body, "error1") + XCTAssertEqual(otel.logs[0].body?.description, "error1") XCTAssertEqual(otel.logs[0].severity, .error) } diff --git a/Tests/EmbraceCoreTests/Internal/Logs/EmbraceLoggerSharedStateTests.swift b/Tests/EmbraceCoreTests/Internal/Logs/EmbraceLoggerSharedStateTests.swift index 6467719e..9eb78369 100644 --- a/Tests/EmbraceCoreTests/Internal/Logs/EmbraceLoggerSharedStateTests.swift +++ b/Tests/EmbraceCoreTests/Internal/Logs/EmbraceLoggerSharedStateTests.swift @@ -3,10 +3,10 @@ // import XCTest - @testable import EmbraceCore @testable import EmbraceOTelInternal @testable import EmbraceStorageInternal +import OpenTelemetrySdk class DummyEmbraceResourceProvider: EmbraceResourceProvider { func getResource() -> Resource { Resource() } diff --git a/Tests/EmbraceCoreTests/Internal/Logs/Exporter/StorageEmbraceLogExporterTests.swift b/Tests/EmbraceCoreTests/Internal/Logs/Exporter/StorageEmbraceLogExporterTests.swift index b8674283..86b9196c 100644 --- a/Tests/EmbraceCoreTests/Internal/Logs/Exporter/StorageEmbraceLogExporterTests.swift +++ b/Tests/EmbraceCoreTests/Internal/Logs/Exporter/StorageEmbraceLogExporterTests.swift @@ -3,11 +3,12 @@ // import XCTest - @testable import EmbraceCore import EmbraceStorageInternal import EmbraceOTelInternal import EmbraceCommonInternal +import OpenTelemetryApi +import OpenTelemetrySdk class StorageEmbraceLogExporterTests: XCTestCase { private var sut: StorageEmbraceLogExporter! @@ -149,7 +150,7 @@ private extension StorageEmbraceLogExporterTests { resource: .init(), instrumentationScopeInfo: .init(), timestamp: Date(), - body: body, + body: .string(body ?? ""), attributes: attributes ) } diff --git a/Tests/EmbraceCoreTests/Internal/Logs/Exporter/Validation/LogDataValidationTests.swift b/Tests/EmbraceCoreTests/Internal/Logs/Exporter/Validation/LogDataValidationTests.swift index a3f892c9..75adf8fc 100644 --- a/Tests/EmbraceCoreTests/Internal/Logs/Exporter/Validation/LogDataValidationTests.swift +++ b/Tests/EmbraceCoreTests/Internal/Logs/Exporter/Validation/LogDataValidationTests.swift @@ -5,6 +5,7 @@ import XCTest @testable import EmbraceCore import EmbraceOTelInternal +import OpenTelemetrySdk final class LogDataValidationTests: XCTestCase { diff --git a/Tests/EmbraceCoreTests/Internal/Logs/Exporter/Validation/Validators/LengthOfBodyValidatorTests.swift b/Tests/EmbraceCoreTests/Internal/Logs/Exporter/Validation/Validators/LengthOfBodyValidatorTests.swift index a4565e65..abfdf622 100644 --- a/Tests/EmbraceCoreTests/Internal/Logs/Exporter/Validation/Validators/LengthOfBodyValidatorTests.swift +++ b/Tests/EmbraceCoreTests/Internal/Logs/Exporter/Validation/Validators/LengthOfBodyValidatorTests.swift @@ -5,6 +5,7 @@ import XCTest @testable import EmbraceCore import EmbraceOTelInternal +import OpenTelemetrySdk final class LengthOfBodyValidatorTests: XCTestCase { @@ -13,7 +14,7 @@ final class LengthOfBodyValidatorTests: XCTestCase { resource: .init(), instrumentationScopeInfo: .init(), timestamp: Date(), - body: body, + body: .string(body ?? ""), attributes: [:] ) } @@ -50,5 +51,4 @@ final class LengthOfBodyValidatorTests: XCTestCase { XCTAssertTrue(validator.validate(data: &validMinimum)) XCTAssertTrue(validator.validate(data: &validMaximum)) } - } diff --git a/Tests/EmbraceCoreTests/Public/EmbraceCoreTests.swift b/Tests/EmbraceCoreTests/Public/EmbraceCoreTests.swift index 217e272d..1fc360f2 100644 --- a/Tests/EmbraceCoreTests/Public/EmbraceCoreTests.swift +++ b/Tests/EmbraceCoreTests/Public/EmbraceCoreTests.swift @@ -7,6 +7,7 @@ import XCTest import EmbraceCommonInternal import EmbraceStorageInternal import EmbraceOTelInternal +import OpenTelemetrySdk final class EmbraceCoreTests: XCTestCase { diff --git a/Tests/EmbraceCoreTests/Session/UnsentDataHandlerTests.swift b/Tests/EmbraceCoreTests/Session/UnsentDataHandlerTests.swift index ac6ed19e..6545d2ec 100644 --- a/Tests/EmbraceCoreTests/Session/UnsentDataHandlerTests.swift +++ b/Tests/EmbraceCoreTests/Session/UnsentDataHandlerTests.swift @@ -443,7 +443,7 @@ class UnsentDataHandlerTests: XCTestCase { XCTAssertEqual(otel.logs.count, 1) XCTAssertEqual(otel.logs[0].attributes["emb.type"], .string(LogType.crash.rawValue)) XCTAssertEqual(otel.logs[0].timestamp, report.timestamp) - XCTAssertEqual(otel.logs[0].body, "") + XCTAssertEqual(otel.logs[0].body?.description, "") XCTAssertEqual(otel.logs[0].severity, .fatal4) XCTAssertEqual(otel.logs[0].attributes["emb.session_id"], .string(TestConstants.sessionId.toString)) XCTAssertEqual(otel.logs[0].attributes["emb.state"], .string(SessionState.foreground.rawValue)) diff --git a/Tests/EmbraceCoreTests/TestSupport/MockLogDataValidator.swift b/Tests/EmbraceCoreTests/TestSupport/MockLogDataValidator.swift index 1cc14182..596178c4 100644 --- a/Tests/EmbraceCoreTests/TestSupport/MockLogDataValidator.swift +++ b/Tests/EmbraceCoreTests/TestSupport/MockLogDataValidator.swift @@ -4,6 +4,7 @@ @testable import EmbraceCore import EmbraceOTelInternal +import OpenTelemetrySdk class MockLogDataValidator: LogDataValidator { @@ -18,5 +19,4 @@ class MockLogDataValidator: LogDataValidator { didValidate = true return isValid } - } diff --git a/Tests/EmbraceCoreTests/TestSupport/MockSpanDataValidator.swift b/Tests/EmbraceCoreTests/TestSupport/MockSpanDataValidator.swift index 226989c7..2840b161 100644 --- a/Tests/EmbraceCoreTests/TestSupport/MockSpanDataValidator.swift +++ b/Tests/EmbraceCoreTests/TestSupport/MockSpanDataValidator.swift @@ -5,6 +5,7 @@ import Foundation @testable import EmbraceCore import EmbraceOTelInternal +import OpenTelemetrySdk class MockSpanDataValidator: SpanDataValidator { @@ -19,5 +20,4 @@ class MockSpanDataValidator: SpanDataValidator { didValidate = true return isValid } - } diff --git a/Tests/EmbraceCoreTests/TestSupport/TestDoubles/ExtendableCrashReporterMock.swift b/Tests/EmbraceCoreTests/TestSupport/TestDoubles/ExtendableCrashReporterMock.swift index fb474de6..7625be48 100644 --- a/Tests/EmbraceCoreTests/TestSupport/TestDoubles/ExtendableCrashReporterMock.swift +++ b/Tests/EmbraceCoreTests/TestSupport/TestDoubles/ExtendableCrashReporterMock.swift @@ -10,7 +10,7 @@ class ExtendableCrashReporterMock: ExtendableCrashReporter { func appendCrashInfo(key: String, value: String) { didCallAppendCrashInfo = true } - + var currentSessionId: String? func install(context: EmbraceCommonInternal.CrashReporterContext, logger: EmbraceCommonInternal.InternalLogger) {} func getLastRunState() -> EmbraceCommonInternal.LastRunState { diff --git a/Tests/EmbraceOTelInternalTests/EmbraceOTelTests.swift b/Tests/EmbraceOTelInternalTests/EmbraceOTelTests.swift index ab4d3ac2..b1a9a992 100644 --- a/Tests/EmbraceOTelInternalTests/EmbraceOTelTests.swift +++ b/Tests/EmbraceOTelInternalTests/EmbraceOTelTests.swift @@ -161,10 +161,10 @@ final class EmbraceOTelTests: XCTestCase { let otel = EmbraceOTel() otel.log("example message", severity: .info, attributes: [:]) - let record = logExporter.finishedLogRecords.first { $0.body == "example message" } + let record = logExporter.finishedLogRecords.first { $0.body == .string("example message") } XCTAssertNotNil(record) - XCTAssertEqual(record?.body, "example message") + XCTAssertEqual(record?.body, .string("example message")) } func test_log_withTimestampAndAttributes_emitsLogToExporter() throws { @@ -177,10 +177,10 @@ final class EmbraceOTelTests: XCTestCase { severity: .info, timestamp: logTime, attributes: ["foo": "bar"]) - let record = logExporter.finishedLogRecords.first { $0.body == "example message" } + let record = logExporter.finishedLogRecords.first { $0.body == .string("example message") } XCTAssertNotNil(record) - XCTAssertEqual(record?.body, "example message") + XCTAssertEqual(record?.body, .string("example message")) XCTAssertEqual(record?.timestamp, logTime) XCTAssertEqual(record?.attributes, ["foo": .string("bar")]) } diff --git a/Tests/EmbraceOTelInternalTests/Logs/EmbraceLogRecordBuilderTests.swift b/Tests/EmbraceOTelInternalTests/Logs/EmbraceLogRecordBuilderTests.swift index c00874b4..471024c2 100644 --- a/Tests/EmbraceOTelInternalTests/Logs/EmbraceLogRecordBuilderTests.swift +++ b/Tests/EmbraceOTelInternalTests/Logs/EmbraceLogRecordBuilderTests.swift @@ -152,7 +152,7 @@ private extension EmbraceLogRecordBuilderTests { } func whenSetting(body: String) { - _ = sut.setBody(body) + _ = sut.setBody(.string(body)) } func whenSetting(attribute: [String: AttributeValue]) { @@ -170,7 +170,7 @@ private extension EmbraceLogRecordBuilderTests { func thenProducedRecordHas(body: String) { XCTAssertTrue(processor.didCallOnEmit) XCTAssertNotNil(processor.receivedLogRecord) - XCTAssertEqual(processor.receivedLogRecord?.body, body) + XCTAssertEqual(processor.receivedLogRecord?.body, .string(body)) } func thenProducedRecordHas(severity: Severity) { diff --git a/Tests/EmbraceOTelInternalTests/Logs/GenericLogExporterTests.swift b/Tests/EmbraceOTelInternalTests/Logs/GenericLogExporterTests.swift index 8377893c..2fd2a99e 100644 --- a/Tests/EmbraceOTelInternalTests/Logs/GenericLogExporterTests.swift +++ b/Tests/EmbraceOTelInternalTests/Logs/GenericLogExporterTests.swift @@ -7,6 +7,8 @@ import XCTest @testable import EmbraceOTelInternal import EmbraceStorageInternal import TestSupport +import OpenTelemetryApi +import OpenTelemetrySdk final class GenericLogExporterTests: XCTestCase { class DummyLogControllable: LogControllable { @@ -25,12 +27,12 @@ final class GenericLogExporterTests: XCTestCase { EmbraceOTel().logger .logRecordBuilder() - .setBody("example log message") + .setBody(.string("example log message")) .emit() let exportedLogRecord = exporter.finishedLogRecords.first XCTAssertNotNil(exportedLogRecord) - XCTAssertEqual(exportedLogRecord?.body, "example log message") + XCTAssertEqual(exportedLogRecord?.body, .string("example log message")) } } diff --git a/Tests/EmbraceOTelInternalTests/Logs/Processors/EmbraceLogRecordProcessorArrayExtension.swift b/Tests/EmbraceOTelInternalTests/Logs/Processors/EmbraceLogRecordProcessorArrayExtension.swift index 14f866cd..87d36351 100644 --- a/Tests/EmbraceOTelInternalTests/Logs/Processors/EmbraceLogRecordProcessorArrayExtension.swift +++ b/Tests/EmbraceOTelInternalTests/Logs/Processors/EmbraceLogRecordProcessorArrayExtension.swift @@ -4,14 +4,12 @@ import Foundation import XCTest - import OpenTelemetrySdk - @testable import EmbraceOTelInternal class EmbraceLogRecordProcessorArrayExtensionTests: XCTestCase { func test_onDefaultWithExporters_returnSingleLogRecordProcessorInstance() throws { - let processors: [EmbraceLogRecordProcessor] = .default(withExporters: []) + let processors: [LogRecordProcessor] = .default(withExporters: []) XCTAssertEqual(processors.count, 1) XCTAssertTrue(try XCTUnwrap(processors.first) is SingleLogRecordProcessor) } diff --git a/Tests/EmbraceOTelInternalTests/Logs/Processors/SingleLogRecordProcessorTests.swift b/Tests/EmbraceOTelInternalTests/Logs/Processors/SingleLogRecordProcessorTests.swift index 24155d85..e43d8657 100644 --- a/Tests/EmbraceOTelInternalTests/Logs/Processors/SingleLogRecordProcessorTests.swift +++ b/Tests/EmbraceOTelInternalTests/Logs/Processors/SingleLogRecordProcessorTests.swift @@ -4,6 +4,7 @@ import XCTest import Foundation +import OpenTelemetrySdk @testable import EmbraceOTelInternal @@ -66,7 +67,7 @@ private extension SingleLogRecordProcessorTests { givenProcessor(withExporters: [exporter]) } - func givenProcessor(withExporters exporters: [EmbraceLogRecordExporter]) { + func givenProcessor(withExporters exporters: [LogRecordExporter]) { sut = .init(exporters: exporters) } diff --git a/Tests/EmbraceOTelInternalTests/Mocks/DummyEmbraceLogShared.swift b/Tests/EmbraceOTelInternalTests/Mocks/DummyEmbraceLogShared.swift index 4e30a078..82979baa 100644 --- a/Tests/EmbraceOTelInternalTests/Mocks/DummyEmbraceLogShared.swift +++ b/Tests/EmbraceOTelInternalTests/Mocks/DummyEmbraceLogShared.swift @@ -8,7 +8,7 @@ import OpenTelemetrySdk @testable import EmbraceOTelInternal class DummyEmbraceLogShared: EmbraceLogSharedState { - var processors: [EmbraceLogRecordProcessor] = [] + var processors: [LogRecordProcessor] = [] var config: any EmbraceLoggerConfig = RandomConfig() var resourceProvider: EmbraceResourceProvider diff --git a/Tests/EmbraceOTelInternalTests/Mocks/DummyEmbraceResourceProvider.swift b/Tests/EmbraceOTelInternalTests/Mocks/DummyEmbraceResourceProvider.swift index 2d8af26a..ab21998e 100644 --- a/Tests/EmbraceOTelInternalTests/Mocks/DummyEmbraceResourceProvider.swift +++ b/Tests/EmbraceOTelInternalTests/Mocks/DummyEmbraceResourceProvider.swift @@ -3,6 +3,7 @@ // import Foundation +import OpenTelemetrySdk @testable import EmbraceOTelInternal diff --git a/Tests/EmbraceOTelInternalTests/Mocks/EmbraceLogRecordExporter.swift b/Tests/EmbraceOTelInternalTests/Mocks/EmbraceLogRecordExporter.swift index 305635f7..1b5e9c5c 100644 --- a/Tests/EmbraceOTelInternalTests/Mocks/EmbraceLogRecordExporter.swift +++ b/Tests/EmbraceOTelInternalTests/Mocks/EmbraceLogRecordExporter.swift @@ -3,25 +3,27 @@ // @testable import EmbraceOTelInternal +import OpenTelemetrySdk +import Foundation -class SpyEmbraceLogRecordExporter: EmbraceLogRecordExporter { +class SpyEmbraceLogRecordExporter: LogRecordExporter { var exportLogRecordsReceivedParameter: [ReadableLogRecord] = [] var stubbedExportResponse: ExportResult? var didCallExport: Bool = false - func export(logRecords: [ReadableLogRecord]) -> ExportResult { + func export(logRecords: [ReadableLogRecord], explicitTimeout: TimeInterval?) -> ExportResult { didCallExport = true exportLogRecordsReceivedParameter = logRecords return stubbedExportResponse! } var didCallShutdown: Bool = false - func shutdown() { + func shutdown(explicitTimeout: TimeInterval?) { didCallShutdown = true } var stubbedForceFlushResponse: ExportResult? var didCallForceFlush: Bool = false - func forceFlush() -> ExportResult { + func forceFlush(explicitTimeout: TimeInterval?) -> ExportResult { didCallForceFlush = true return stubbedForceFlushResponse! } diff --git a/Tests/EmbraceOTelInternalTests/Mocks/MockEmbraceLogSharedState.swift b/Tests/EmbraceOTelInternalTests/Mocks/MockEmbraceLogSharedState.swift index 9e3105cb..4f395f87 100644 --- a/Tests/EmbraceOTelInternalTests/Mocks/MockEmbraceLogSharedState.swift +++ b/Tests/EmbraceOTelInternalTests/Mocks/MockEmbraceLogSharedState.swift @@ -8,12 +8,12 @@ import OpenTelemetrySdk @testable import EmbraceOTelInternal class MockEmbraceLogSharedState: EmbraceLogSharedState { - var processors: [EmbraceLogRecordProcessor] + var processors: [LogRecordProcessor] var config: any EmbraceLoggerConfig var resourceProvider: EmbraceResourceProvider init( - processors: [EmbraceLogRecordProcessor] = [], + processors: [LogRecordProcessor] = [], config: any EmbraceLoggerConfig = RandomConfig(), resourceProvider: EmbraceResourceProvider = DummyEmbraceResourceProvider() ) { diff --git a/Tests/EmbraceOTelInternalTests/Mocks/SpyEmbraceResourceProvider.swift b/Tests/EmbraceOTelInternalTests/Mocks/SpyEmbraceResourceProvider.swift index a443e2e1..86a236fa 100644 --- a/Tests/EmbraceOTelInternalTests/Mocks/SpyEmbraceResourceProvider.swift +++ b/Tests/EmbraceOTelInternalTests/Mocks/SpyEmbraceResourceProvider.swift @@ -3,7 +3,7 @@ // import Foundation - +import OpenTelemetrySdk @testable import EmbraceOTelInternal class SpyEmbraceResourceProvider: EmbraceResourceProvider { diff --git a/Tests/EmbraceOTelInternalTests/Mocks/SpyLoggerProcessor.swift b/Tests/EmbraceOTelInternalTests/Mocks/SpyLoggerProcessor.swift index 1951ae46..5cb1fd63 100644 --- a/Tests/EmbraceOTelInternalTests/Mocks/SpyLoggerProcessor.swift +++ b/Tests/EmbraceOTelInternalTests/Mocks/SpyLoggerProcessor.swift @@ -4,8 +4,9 @@ import Foundation @testable import EmbraceOTelInternal +import OpenTelemetrySdk -class SpyLoggerProcessor: EmbraceLogRecordProcessor { +class SpyLoggerProcessor: LogRecordProcessor { var receivedLogRecord: ReadableLogRecord? var didCallOnEmit = false func onEmit(logRecord: ReadableLogRecord) { @@ -14,13 +15,13 @@ class SpyLoggerProcessor: EmbraceLogRecordProcessor { } var didCallForceFlush = false - func forceFlush() -> ExportResult { + func forceFlush(explicitTimeout: TimeInterval?) -> ExportResult { didCallForceFlush = true return .success } var didCallShutdown = false - func shutdown() -> ExportResult { + func shutdown(explicitTimeout: TimeInterval?) -> ExportResult { didCallShutdown = true return .success } diff --git a/Tests/EmbraceOTelInternalTests/Shared/EmbraceResourceProviderTests.swift b/Tests/EmbraceOTelInternalTests/Shared/EmbraceResourceProviderTests.swift index 529c7801..ddfa96fe 100644 --- a/Tests/EmbraceOTelInternalTests/Shared/EmbraceResourceProviderTests.swift +++ b/Tests/EmbraceOTelInternalTests/Shared/EmbraceResourceProviderTests.swift @@ -4,6 +4,7 @@ import XCTest @testable import EmbraceOTelInternal +import OpenTelemetrySdk struct MockResourceProvider: EmbraceResourceProvider { let resource: Resource @@ -50,5 +51,4 @@ final class EmbraceResourceProviderTests: XCTestCase { XCTAssertEqual(resource.attributes["my.age"], .int(42)) XCTAssertEqual(resource.attributes["service.name"], .string("example")) } - } diff --git a/Tests/EmbraceOTelInternalTests/TestSupport/SpanProcessor/NoopSpanProcessor.swift b/Tests/EmbraceOTelInternalTests/TestSupport/SpanProcessor/NoopSpanProcessor.swift index c2cc9d2f..6b0825f4 100644 --- a/Tests/EmbraceOTelInternalTests/TestSupport/SpanProcessor/NoopSpanProcessor.swift +++ b/Tests/EmbraceOTelInternalTests/TestSupport/SpanProcessor/NoopSpanProcessor.swift @@ -1,11 +1,13 @@ import Foundation import EmbraceOTelInternal +import OpenTelemetryApi +import OpenTelemetrySdk -extension EmbraceSpanProcessor where Self == NoopSpanProcessor { +extension SpanProcessor where Self == NoopSpanProcessor { static var noop: NoopSpanProcessor { .init() } } -public struct NoopSpanProcessor: EmbraceSpanProcessor { +public struct NoopSpanProcessor: SpanProcessor { public let isStartRequired: Bool = true public let isEndRequired: Bool = true @@ -16,5 +18,5 @@ public struct NoopSpanProcessor: EmbraceSpanProcessor { public func forceFlush(timeout: TimeInterval?) { } - public mutating func shutdown() { } + public mutating func shutdown(explicitTimeout: TimeInterval?) { } } diff --git a/Tests/EmbraceOTelInternalTests/Trace/Tracer/Span/Processor/SingleSpanProcessorTests.swift b/Tests/EmbraceOTelInternalTests/Trace/Tracer/Span/Processor/SingleSpanProcessorTests.swift index 3ae415a3..5351f509 100644 --- a/Tests/EmbraceOTelInternalTests/Trace/Tracer/Span/Processor/SingleSpanProcessorTests.swift +++ b/Tests/EmbraceOTelInternalTests/Trace/Tracer/Span/Processor/SingleSpanProcessorTests.swift @@ -13,7 +13,7 @@ final class SingleSpanProcessorTests: XCTestCase { let exporter = InMemorySpanExporter() func createSpanData( - processor: EmbraceSpanProcessor, + processor: SpanProcessor, traceId: TraceId = .random(), spanId: SpanId = .random(), name: String = "example", @@ -136,7 +136,7 @@ final class SingleSpanProcessorTests: XCTestCase { } func test_shutdown_callsShutdownOnExporter() throws { - let processor = SingleSpanProcessor(spanExporter: exporter) + var processor = SingleSpanProcessor(spanExporter: exporter) XCTAssertFalse(exporter.isShutdown) processor.shutdown() @@ -144,7 +144,7 @@ final class SingleSpanProcessorTests: XCTestCase { } func test_shutdown_processesOngoingQueue() throws { - let processor = SingleSpanProcessor(spanExporter: exporter) + var processor = SingleSpanProcessor(spanExporter: exporter) let count = 100 let spans = (0.. ExportResult { + public func export(logRecords: [ReadableLogRecord], explicitTimeout: TimeInterval?) -> ExportResult { guard isRunning else { return .failure } @@ -19,12 +20,12 @@ public class InMemoryLogRecordExporter: LogRecordExporter { return .success } - public func shutdown() { + public func shutdown(explicitTimeout: TimeInterval?) { finishedLogRecords.removeAll() isRunning = false } - public func forceFlush() -> ExportResult { + public func forceFlush(explicitTimeout: TimeInterval?) -> ExportResult { guard isRunning else { return .failure } diff --git a/Tests/TestSupport/Mocks/MockEmbraceOpenTelemetry.swift b/Tests/TestSupport/Mocks/MockEmbraceOpenTelemetry.swift index 9ff91129..43d9da57 100644 --- a/Tests/TestSupport/Mocks/MockEmbraceOpenTelemetry.swift +++ b/Tests/TestSupport/Mocks/MockEmbraceOpenTelemetry.swift @@ -93,7 +93,7 @@ public class MockEmbraceOpenTelemetry: NSObject, EmbraceOpenTelemetry { instrumentationScopeInfo: .init(), timestamp: timestamp, severity: Severity.fromLogSeverity(severity), - body: message, + body: .string(message), attributes: otelAttributes ) diff --git a/Tests/TestSupport/Mocks/MockSpanProcessor.swift b/Tests/TestSupport/Mocks/MockSpanProcessor.swift index 64f6f93e..feebda52 100644 --- a/Tests/TestSupport/Mocks/MockSpanProcessor.swift +++ b/Tests/TestSupport/Mocks/MockSpanProcessor.swift @@ -4,8 +4,11 @@ import Foundation import EmbraceOTelInternal +import OpenTelemetryApi +import OpenTelemetrySdk + +public class MockSpanProcessor: SpanProcessor { -public class MockSpanProcessor: EmbraceSpanProcessor { private(set) public var startedSpans = [SpanData]() private(set) public var endedSpans = [SpanData]() private(set) public var didShutdown = false @@ -29,7 +32,7 @@ public class MockSpanProcessor: EmbraceSpanProcessor { didForceFlush = true } - public func shutdown() { + public func shutdown(explicitTimeout: TimeInterval?) { didShutdown = true } diff --git a/Tests/TestSupport/Mocks/SpanExporter/InMemorySpanExporter.swift b/Tests/TestSupport/Mocks/SpanExporter/InMemorySpanExporter.swift index 84c0efec..3685714c 100644 --- a/Tests/TestSupport/Mocks/SpanExporter/InMemorySpanExporter.swift +++ b/Tests/TestSupport/Mocks/SpanExporter/InMemorySpanExporter.swift @@ -4,8 +4,10 @@ import EmbraceOTelInternal import OpenTelemetryApi +import OpenTelemetrySdk +import Foundation -public class InMemorySpanExporter: EmbraceSpanExporter { +public class InMemorySpanExporter: SpanExporter { public private(set) var exportedSpans: [SpanId: SpanData] = [:] @@ -25,7 +27,7 @@ public class InMemorySpanExporter: EmbraceSpanExporter { self.onFlush = completion } - public func export(spans: [SpanData]) -> SpanExporterResultCode { + public func export(spans: [SpanData], explicitTimeout: TimeInterval?) -> SpanExporterResultCode { spans.forEach { data in exportedSpans[data.spanId] = data } @@ -34,12 +36,12 @@ public class InMemorySpanExporter: EmbraceSpanExporter { return .success } - public func flush() -> SpanExporterResultCode { + public func flush(explicitTimeout: TimeInterval?) -> SpanExporterResultCode { onFlush?() return .success } - public func shutdown() { + public func shutdown(explicitTimeout: TimeInterval?) { isShutdown = true } } diff --git a/Tuist/Package.resolved b/Tuist/Package.resolved index cf12adcc..e36c03cf 100644 --- a/Tuist/Package.resolved +++ b/Tuist/Package.resolved @@ -21,10 +21,10 @@ { "identity" : "grdb.swift", "kind" : "remoteSourceControl", - "location" : "https://github.com/groue/GRDB.swift", + "location" : "https://github.com/groue/GRDB.swift.git", "state" : { - "revision" : "e83f3eb25ef4d5a36a13dbee98f8ac67e24e5c8f", - "version" : "6.16.0" + "revision" : "dd6b98ce04eda39aa22f066cd421c24d7236ea8a", + "version" : "6.29.1" } }, { @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/embrace-io/KSCrash.git", "state" : { - "revision" : "ec0a132849798ec5630eda5cb7d6ff226e50ec87", - "version" : "2.0.0" + "revision" : "30df8d35f1cc8d0537d595c4b18ddc0eb2675511", + "version" : "2.0.2" } }, { @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/open-telemetry/opentelemetry-swift", "state" : { - "revision" : "37b52e2070cb925d98de30b51af6f0de91feae89", - "version" : "1.5.1" + "revision" : "0dd37c4a14a6aeeb131eea40a13cb3832c7c6a97", + "version" : "1.10.1" } }, { @@ -63,15 +63,6 @@ "version" : "0.5.2" } }, - { - "identity" : "reachability.swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/ashleymills/Reachability.swift", - "state" : { - "revision" : "7cbd73f46a7dfaeca079e18df7324c6de6d1834a", - "version" : "5.2.3" - } - }, { "identity" : "sourcekitten", "kind" : "remoteSourceControl", @@ -104,8 +95,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-collections.git", "state" : { - "revision" : "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb", - "version" : "1.1.0" + "revision" : "3d2dc41a01f9e49d84f0a3925fb858bed64f702d", + "version" : "1.1.2" } }, { @@ -131,8 +122,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-http-types", "state" : { - "revision" : "9bee2fdb79cc740081abd8ebd80738063d632286", - "version" : "1.1.0" + "revision" : "1ddbea1ee34354a6a2532c60f98501c35ae8edfa", + "version" : "1.2.0" } }, { @@ -140,8 +131,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-log.git", "state" : { - "revision" : "e97a6fcb1ab07462881ac165fdbb37f067e205d5", - "version" : "1.5.4" + "revision" : "9cb486020ebf03bfa5b5df985387a14a98744537", + "version" : "1.6.1" } }, { @@ -149,8 +140,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-metrics.git", "state" : { - "revision" : "ce594e71e92a1610015017f83f402894df540e51", - "version" : "2.4.4" + "revision" : "971ba26378ab69c43737ee7ba967a896cb74c0d1", + "version" : "2.4.1" } }, { @@ -158,8 +149,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio.git", "state" : { - "revision" : "359c461e5561d22c6334828806cc25d759ca7aa6", - "version" : "2.65.0" + "revision" : "fc79798d5a150d61361a27ce0c51169b889e23de", + "version" : "2.68.0" } }, { @@ -167,8 +158,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-extras.git", "state" : { - "revision" : "a3b640d7dc567225db7c94386a6e71aded1bfa63", - "version" : "1.22.0" + "revision" : "05c36b57453d23ea63785d58a7dbc7b70ba1745e", + "version" : "1.23.0" } }, { @@ -176,8 +167,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-http2.git", "state" : { - "revision" : "c6afe04165c865faaa687b42c32ed76dfcc91076", - "version" : "1.31.0" + "revision" : "a0224f3d20438635dd59c9fcc593520d80d131d0", + "version" : "1.33.0" } }, { @@ -185,8 +176,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-ssl.git", "state" : { - "revision" : "7c381eb6083542b124a6c18fae742f55001dc2b5", - "version" : "2.26.0" + "revision" : "2b09805797f21c380f7dc9bedaab3157c5508efb", + "version" : "2.27.0" } }, { @@ -194,8 +185,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-nio-transport-services.git", "state" : { - "revision" : "38ac8221dd20674682148d6451367f89c2652980", - "version" : "1.21.0" + "revision" : "41f4098903878418537020075a4d8a6e20a0b182", + "version" : "1.17.0" } }, { @@ -203,8 +194,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-protobuf.git", "state" : { - "revision" : "9f0c76544701845ad98716f3f6a774a892152bcb", - "version" : "1.26.0" + "revision" : "d57a5aecf24a25b32ec4a74be2f5d0a995a47c4b", + "version" : "1.27.0" } }, { @@ -221,8 +212,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-system.git", "state" : { - "revision" : "f9266c85189c2751589a50ea5aec72799797e471", - "version" : "1.3.0" + "revision" : "6a9e38e7bd22a3b8ba80bddf395623cf68f57807", + "version" : "1.3.1" } }, { @@ -266,8 +257,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/jpsim/Yams.git", "state" : { - "revision" : "9234124cff5e22e178988c18d8b95a8ae8007f76", - "version" : "5.1.2" + "revision" : "0d9ee7ea8c4ebd4a489ad7a73d5c6cad55d6fed3", + "version" : "5.0.6" } } ], diff --git a/Tuist/Package.swift b/Tuist/Package.swift index ae7daead..6c90e578 100644 --- a/Tuist/Package.swift +++ b/Tuist/Package.swift @@ -26,15 +26,15 @@ let package = Package( dependencies: [ .package( url: "https://github.com/embrace-io/KSCrash.git", - exact: "2.0.0" + exact: "2.0.2" ), .package( url: "https://github.com/open-telemetry/opentelemetry-swift", - exact: "1.5.1" + exact: "1.10.1" ), .package( url: "https://github.com/groue/GRDB.swift", - exact: "6.16.0" + exact: "6.29.1" ), .package( url: "https://github.com/realm/SwiftLint",