@@ -36,7 +36,7 @@ final class SessionLogRecordProcessorTests: XCTestCase {
3636 XCTAssertEqual ( mockNextProcessor. receivedLogRecords. count, 1 )
3737 let enhancedRecord = mockNextProcessor. receivedLogRecords [ 0 ]
3838
39- if case let . string( sessionId) = enhancedRecord. attributes [ SessionConstants . id ] {
39+ if case let . string( sessionId) = enhancedRecord. attributes [ SemanticConventions . Session . id . rawValue ] {
4040 XCTAssertEqual ( sessionId, expectedSessionId)
4141 } else {
4242 XCTFail ( " Expected session.id attribute to be a string value " )
@@ -75,13 +75,13 @@ final class SessionLogRecordProcessorTests: XCTestCase {
7575
7676 let enhancedRecord = mockNextProcessor. receivedLogRecords [ 0 ]
7777
78- if case let . string( sessionId) = enhancedRecord. attributes [ SessionConstants . id ] {
78+ if case let . string( sessionId) = enhancedRecord. attributes [ SemanticConventions . Session . id . rawValue ] {
7979 XCTAssertEqual ( sessionId, expectedSessionId)
8080 } else {
8181 XCTFail ( " Expected session.id attribute to be a string value " )
8282 }
8383
84- if case let . string( previousSessionId) = enhancedRecord. attributes [ SessionConstants . previousId] {
84+ if case let . string( previousSessionId) = enhancedRecord. attributes [ SemanticConventions . Session . previousId. rawValue ] {
8585 XCTAssertEqual ( previousSessionId, expectedPreviousSessionId)
8686 } else {
8787 XCTFail ( " Expected session.previous_id attribute to be a string value " )
@@ -97,13 +97,13 @@ final class SessionLogRecordProcessorTests: XCTestCase {
9797
9898 let enhancedRecord = mockNextProcessor. receivedLogRecords [ 0 ]
9999
100- if case let . string( sessionId) = enhancedRecord. attributes [ SessionConstants . id ] {
100+ if case let . string( sessionId) = enhancedRecord. attributes [ SemanticConventions . Session . id . rawValue ] {
101101 XCTAssertEqual ( sessionId, expectedSessionId)
102102 } else {
103103 XCTFail ( " Expected session.id attribute to be a string value " )
104104 }
105105
106- XCTAssertNil ( enhancedRecord. attributes [ SessionConstants . previousId] , " Previous session ID should not be set when nil " )
106+ XCTAssertNil ( enhancedRecord. attributes [ SemanticConventions . Session . previousId. rawValue ] , " Previous session ID should not be set when nil " )
107107 }
108108
109109 func testOnEmitWithDifferentSessionIds( ) {
@@ -115,13 +115,13 @@ final class SessionLogRecordProcessorTests: XCTestCase {
115115
116116 XCTAssertEqual ( mockNextProcessor. receivedLogRecords. count, 2 )
117117
118- if case let . string( sessionId1) = mockNextProcessor. receivedLogRecords [ 0 ] . attributes [ SessionConstants . id ] {
118+ if case let . string( sessionId1) = mockNextProcessor. receivedLogRecords [ 0 ] . attributes [ SemanticConventions . Session . id . rawValue ] {
119119 XCTAssertEqual ( sessionId1, " session-1 " )
120120 } else {
121121 XCTFail ( " Expected first log record to have session-1 " )
122122 }
123123
124- if case let . string( sessionId2) = mockNextProcessor. receivedLogRecords [ 1 ] . attributes [ SessionConstants . id ] {
124+ if case let . string( sessionId2) = mockNextProcessor. receivedLogRecords [ 1 ] . attributes [ SemanticConventions . Session . id . rawValue ] {
125125 XCTAssertEqual ( sessionId2, " session-2 " )
126126 } else {
127127 XCTFail ( " Expected second log record to have session-2 " )
@@ -148,8 +148,8 @@ final class SessionLogRecordProcessorTests: XCTestCase {
148148 severity: . info,
149149 body: AttributeValue . string ( " session.start " ) ,
150150 attributes: [
151- SessionConstants . id : AttributeValue . string ( " existing-session-123 " ) ,
152- SessionConstants . previousId: AttributeValue . string ( " existing-previous-456 " )
151+ SemanticConventions . Session . id . rawValue : AttributeValue . string ( " existing-session-123 " ) ,
152+ SemanticConventions . Session . previousId. rawValue : AttributeValue . string ( " existing-previous-456 " )
153153 ]
154154 )
155155
@@ -158,13 +158,13 @@ final class SessionLogRecordProcessorTests: XCTestCase {
158158
159159 let enhancedRecord = mockNextProcessor. receivedLogRecords [ 0 ]
160160
161- if case let . string( sessionId) = enhancedRecord. attributes [ SessionConstants . id ] {
161+ if case let . string( sessionId) = enhancedRecord. attributes [ SemanticConventions . Session . id . rawValue ] {
162162 XCTAssertEqual ( sessionId, " existing-session-123 " , " Should preserve existing session ID for session.start " )
163163 } else {
164164 XCTFail ( " Expected existing session.id to be preserved " )
165165 }
166166
167- if case let . string( previousId) = enhancedRecord. attributes [ SessionConstants . previousId] {
167+ if case let . string( previousId) = enhancedRecord. attributes [ SemanticConventions . Session . previousId. rawValue ] {
168168 XCTAssertEqual ( previousId, " existing-previous-456 " , " Should preserve existing previous session ID " )
169169 } else {
170170 XCTFail ( " Expected existing session.previous_id to be preserved " )
@@ -181,7 +181,7 @@ final class SessionLogRecordProcessorTests: XCTestCase {
181181 severity: . info,
182182 body: AttributeValue . string ( " session.end " ) ,
183183 attributes: [
184- SessionConstants . id : AttributeValue . string ( " ending-session-789 " ) ,
184+ SemanticConventions . Session . id . rawValue : AttributeValue . string ( " ending-session-789 " ) ,
185185 " session.duration " : AttributeValue . double ( 123.45 )
186186 ]
187187 )
@@ -191,7 +191,7 @@ final class SessionLogRecordProcessorTests: XCTestCase {
191191
192192 let enhancedRecord = mockNextProcessor. receivedLogRecords [ 0 ]
193193
194- if case let . string( sessionId) = enhancedRecord. attributes [ SessionConstants . id ] {
194+ if case let . string( sessionId) = enhancedRecord. attributes [ SemanticConventions . Session . id . rawValue ] {
195195 XCTAssertEqual ( sessionId, " ending-session-789 " , " Should preserve existing session ID for session.end " )
196196 } else {
197197 XCTFail ( " Expected existing session.id to be preserved " )
@@ -234,7 +234,7 @@ final class SessionLogRecordProcessorTests: XCTestCase {
234234 XCTAssertEqual ( enhancedRecord. spanContext, logRecordWithEventName. spanContext)
235235
236236 // Verify session attributes were added
237- if case let . string( sessionId) = enhancedRecord. attributes [ SessionConstants . id ] {
237+ if case let . string( sessionId) = enhancedRecord. attributes [ SemanticConventions . Session . id . rawValue ] {
238238 XCTAssertEqual ( sessionId, " test-session-123 " )
239239 } else {
240240 XCTFail ( " Expected session.id attribute to be added " )
@@ -276,7 +276,7 @@ final class SessionLogRecordProcessorTests: XCTestCase {
276276
277277 XCTAssertEqual ( mockNextProcessor. receivedLogRecords. count, 10 )
278278 for record in mockNextProcessor. receivedLogRecords {
279- XCTAssertTrue ( record. attributes. keys. contains ( SessionConstants . id ) )
279+ XCTAssertTrue ( record. attributes. keys. contains ( SemanticConventions . Session . id . rawValue ) )
280280 }
281281 }
282282}
0 commit comments