diff --git a/Tests/DatadogTests/Datadog/LoggerTests.swift b/Tests/DatadogTests/Datadog/LoggerTests.swift index ec14ebd1dd..dcb7b2caeb 100644 --- a/Tests/DatadogTests/Datadog/LoggerTests.swift +++ b/Tests/DatadogTests/Datadog/LoggerTests.swift @@ -488,19 +488,19 @@ class LoggerTests: XCTestCase { // then let logMatcher = try logging.waitAndReturnLogMatchers(count: 1)[0] logMatcher.assertValue( - forKeyPath: "application_id", + forKeyPath: RUMMonitor.Attributes.applicationID, equals: rum.configuration.applicationID ) logMatcher.assertValue( - forKeyPath: "session_id", + forKeyPath: RUMMonitor.Attributes.sessionID, isTypeOf: String.self ) logMatcher.assertValue( - forKeyPath: "view.id", + forKeyPath: RUMMonitor.Attributes.viewID, isTypeOf: String.self ) logMatcher.assertValue( - forKeyPath: "user_action.id", + forKeyPath: RUMMonitor.Attributes.userActionID, isTypeOf: String.self ) } diff --git a/Tests/DatadogTests/Datadog/TracerTests.swift b/Tests/DatadogTests/Datadog/TracerTests.swift index 04ebabcd20..c75a116d33 100644 --- a/Tests/DatadogTests/Datadog/TracerTests.swift +++ b/Tests/DatadogTests/Datadog/TracerTests.swift @@ -676,11 +676,11 @@ class TracerTests: XCTestCase { // then let spanMatcher = try tracing.waitAndReturnSpanMatchers(count: 1)[0] XCTAssertEqual( - try spanMatcher.meta.custom(keyPath: "meta.application_id"), + try spanMatcher.meta.custom(keyPath: "meta.\(RUMMonitor.Attributes.applicationID)"), rum.configuration.applicationID ) - XCTAssertValidRumUUID(try spanMatcher.meta.custom(keyPath: "meta.session_id")) - XCTAssertValidRumUUID(try spanMatcher.meta.custom(keyPath: "meta.view.id")) + XCTAssertValidRumUUID(try spanMatcher.meta.custom(keyPath: "meta.\(RUMMonitor.Attributes.sessionID)")) + XCTAssertValidRumUUID(try spanMatcher.meta.custom(keyPath: "meta.\(RUMMonitor.Attributes.viewID)")) } func testGivenBundlingWithRUMEnabledButRUMMonitorNotRegistered_whenSendingSpan_itPrintsWarning() throws { @@ -697,9 +697,9 @@ class TracerTests: XCTestCase { // then let spanMatcher = try tracing.waitAndReturnSpanMatchers(count: 1)[0] - XCTAssertNil(try? spanMatcher.meta.custom(keyPath: "meta.application_id")) - XCTAssertNil(try? spanMatcher.meta.custom(keyPath: "meta.session_id")) - XCTAssertNil(try? spanMatcher.meta.custom(keyPath: "meta.view.id")) + XCTAssertNil(try? spanMatcher.meta.custom(keyPath: "meta.\(RUMMonitor.Attributes.applicationID)")) + XCTAssertNil(try? spanMatcher.meta.custom(keyPath: "meta.\(RUMMonitor.Attributes.sessionID)")) + XCTAssertNil(try? spanMatcher.meta.custom(keyPath: "meta.\(RUMMonitor.Attributes.viewID)")) } // MARK: - Injecting span context into carrier