Skip to content

Commit

Permalink
Bumped version to 2.2.2-beta.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Nacho Bonafonte committed Feb 8, 2023
1 parent c121063 commit f130355
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DatadogSDKTesting.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "DatadogSDKTesting"
s.module_name = "DatadogSDKTesting"
s.version = "2.2.2"
s.version = "2.2.2-beta.3"
s.summary = "Swift testing framework for Datadog's CI Visibility product"

s.homepage = "https://www.datadoghq.com"
Expand Down
28 changes: 14 additions & 14 deletions DatadogSDKTesting.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3442,7 +3442,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
OTHER_LDFLAGS = "-weak-lXCTestSwiftSupport";
PRODUCT_BUNDLE_IDENTIFIER = com.datadoghq.DatadogSDKTesting;
PRODUCT_NAME = DatadogSDKTesting;
Expand Down Expand Up @@ -3470,7 +3470,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
OTHER_LDFLAGS = "-weak-lXCTestSwiftSupport";
PRODUCT_BUNDLE_IDENTIFIER = com.datadoghq.DatadogSDKTesting;
PRODUCT_NAME = DatadogSDKTesting;
Expand All @@ -3497,7 +3497,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
OTHER_LDFLAGS = "-weak-lXCTestSwiftSupport";
PRODUCT_BUNDLE_IDENTIFIER = com.datadoghq.DatadogSDKTesting;
PRODUCT_NAME = DatadogSDKTesting;
Expand Down Expand Up @@ -3525,7 +3525,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
OTHER_LDFLAGS = "-weak-lXCTestSwiftSupport";
PRODUCT_BUNDLE_IDENTIFIER = com.datadoghq.DatadogSDKTesting;
PRODUCT_NAME = DatadogSDKTesting;
Expand Down Expand Up @@ -3675,7 +3675,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -3747,7 +3747,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LLVM_LTO = YES_THIN;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -3780,7 +3780,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
OTHER_LDFLAGS = " -weak-lXCTestSwiftSupport";
PRODUCT_BUNDLE_IDENTIFIER = com.datadoghq.DatadogSDKTesting;
PRODUCT_NAME = DatadogSDKTesting;
Expand All @@ -3805,7 +3805,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
OTHER_LDFLAGS = " -weak-lXCTestSwiftSupport";
PRODUCT_BUNDLE_IDENTIFIER = com.datadoghq.DatadogSDKTesting;
PRODUCT_NAME = DatadogSDKTesting;
Expand Down Expand Up @@ -3874,7 +3874,7 @@
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
PRODUCT_BUNDLE_IDENTIFIER = com.datadoghq.EventsExporter;
PRODUCT_NAME = EventsExporter;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -3905,7 +3905,7 @@
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
PRODUCT_BUNDLE_IDENTIFIER = com.datadoghq.EventsExporter;
PRODUCT_NAME = EventsExporter;
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -3938,7 +3938,7 @@
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
PRODUCT_BUNDLE_IDENTIFIER = com.datadoghq.EventsExporter;
PRODUCT_NAME = EventsExporter;
SDKROOT = macosx;
Expand Down Expand Up @@ -3970,7 +3970,7 @@
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
PRODUCT_BUNDLE_IDENTIFIER = com.datadoghq.EventsExporter;
PRODUCT_NAME = EventsExporter;
SDKROOT = macosx;
Expand Down Expand Up @@ -4002,7 +4002,7 @@
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
PRODUCT_BUNDLE_IDENTIFIER = "com.datadoghq.EventsExporter-tvOS";
PRODUCT_NAME = EventsExporter;
SDKROOT = appletvos;
Expand Down Expand Up @@ -4034,7 +4034,7 @@
"@loader_path/Frameworks",
);
MACH_O_TYPE = staticlib;
MARKETING_VERSION = 2.2.2;
MARKETING_VERSION = 2.2.2-beta.3;
PRODUCT_BUNDLE_IDENTIFIER = "com.datadoghq.EventsExporter-tvOS";
PRODUCT_NAME = EventsExporter;
SDKROOT = appletvos;
Expand Down
2 changes: 2 additions & 0 deletions Sources/DatadogSDKTesting/DDTestModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ public class DDTestModule: NSObject, Encodable {
metrics[DDTestSuiteVisibilityTags.testCoverageLines] = linesCovered
}
DDTestMonitor.tracer.eventsExporter?.exportEvent(event: DDTestModuleEnvelope(self))
Log.debug("Exported module_end event moduleId: \(self.id)")

let testSession = DDTestSession(testModule: self)
DDTestMonitor.tracer.eventsExporter?.exportEvent(event: DDTestSession.DDTestSessionEnvelope(testSession))
Log.debug("Exported session_end event sessionId: \(self.sessionId)")

if let coverageHelper = DDTestMonitor.instance?.coverageHelper {
/// We need to wait for all the traces to be written to the backend before exiting
Expand Down
7 changes: 7 additions & 0 deletions Sources/DatadogSDKTesting/DDTestMonitor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ internal class DDTestMonitor {
guard !DDTestMonitor.env.disableTestInstrumenting else {
return
}

instrumentationWorkQueue.addOperation {
Log.measure(name: "DDTracer") {
_ = DDTestMonitor.tracer
}
}


if !DDTestMonitor.env.disableCrashHandler {
instrumentationWorkQueue.addOperation {
Expand Down
1 change: 1 addition & 0 deletions Sources/DatadogSDKTesting/DDTestObserver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class DDTestObserver: NSObject, XCTestObservation {

func startObserving() {
XCTestObservationCenter.shared.addTestObserver(self)
Log.debug("Start observing DDtestObserver: \(ObjectIdentifier(self))")
}

func testBundleWillStart(_ testBundle: Bundle) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/DatadogSDKTesting/DDTestSuite.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class DDTestSuite: NSObject, Encodable {
meta[DDUISettingsTags.uiSettingsSuiteLocalization] = localization
meta[DDUISettingsTags.uiSettingsModuleLocalization] = module.localization
DDTestMonitor.tracer.eventsExporter?.exportEvent(event: DDTestSuiteEnvelope(self))
/// We need to wait for all the traces to be written to the backend before exiting
Log.debug("Exported suite_end event suiteId: \(self.id)")
}

/// Ends the test suite
Expand Down
1 change: 1 addition & 0 deletions Sources/EventsExporter/EventsExporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class EventsExporter: SpanExporter {
logsExporter = try LogsExporter(config: configuration)
coverageExporter = try CoverageExporter(config: configuration)
itrService = try ITRService(config: configuration)
Log.debug("EventsExporter created: \(spansExporter.runtimeId)")
}

public func export(spans: [SpanData]) -> SpanExporterResultCode {
Expand Down
3 changes: 2 additions & 1 deletion Sources/EventsExporter/Spans/SpansExporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ internal class SpansExporter {
let configuration: ExporterConfiguration
let spansStorage: FeatureStorage
let spansUpload: FeatureUpload
let runtimeId = UUID().uuidString

init(config: ExporterConfiguration) throws {
self.configuration = config
Expand All @@ -23,7 +24,7 @@ internal class SpansExporter {
)

let genericMetadata = """
"*": { "env": "\(configuration.environment)", "runtime-id": "\(UUID().uuidString)", "language": "swift", "library_version": "\(configuration.libraryVersion)"}
"*": { "env": "\(configuration.environment)", "runtime-id": "\(runtimeId)", "language": "swift", "library_version": "\(configuration.libraryVersion)"}
"""

let prefix = """
Expand Down

0 comments on commit f130355

Please sign in to comment.