Skip to content

Commit 571c50d

Browse files
committed
Fix renamed properties
1 parent cc28f6b commit 571c50d

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

Sources/Sentry/SentryWatchdogTerminationScopeObserver.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ - (void)setLevel:(enum SentryLevel)level
7979

8080
- (void)setTags:(nullable NSDictionary<NSString *, NSString *> *)tags
8181
{
82-
[self.fieldsProcessor setTags:tags];
82+
[self.attributesProcessor setTags:tags];
8383
}
8484

8585
- (void)setUser:(nullable SentryUser *)user
@@ -89,7 +89,7 @@ - (void)setUser:(nullable SentryUser *)user
8989

9090
- (void)setTraceContext:(nullable NSDictionary<NSString *, id> *)traceContext
9191
{
92-
[self.fieldsProcessor setTraceContext:traceContext];
92+
[self.attributesProcessor setTraceContext:traceContext];
9393
}
9494

9595
@end

Tests/SentryTests/Integrations/WatchdogTerminations/SentryWatchdogTerminationScopeObserverTests.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -215,50 +215,50 @@ class SentryWatchdogTerminationScopeObserverTests: XCTestCase {
215215
XCTAssertEqual(invocationContext, env)
216216
}
217217

218-
func testSetTags_whenTagsIsNil_shouldCallFieldsProcessorSetTags() throws {
218+
func testSetTags_whenTagsIsNil_shouldCallAttributesProcessorSetTags() throws {
219219
// -- Act --
220220
sut.setTags(nil)
221221

222222
// -- Assert --
223-
XCTAssertEqual(fixture.fieldsProcessor.setTagsInvocations.count, 1)
224-
let invocation = try XCTUnwrap(fixture.fieldsProcessor.setTagsInvocations.first)
223+
XCTAssertEqual(fixture.attributesProcessor.setTagsInvocations.count, 1)
224+
let invocation = try XCTUnwrap(fixture.attributesProcessor.setTagsInvocations.first)
225225
XCTAssertNil(invocation)
226226
}
227227

228-
func testSetTags_whenTagsIsDefined_shouldCallFieldsProcessorSetTags() throws {
228+
func testSetTags_whenTagsIsDefined_shouldCallAttributesProcessorSetTags() throws {
229229
// -- Arrange --
230230
let tags = fixture.tags
231231

232232
// -- Act --
233233
sut.setTags(tags)
234234

235235
// -- Assert --
236-
XCTAssertEqual(fixture.fieldsProcessor.setTagsInvocations.count, 1)
237-
let invocation = try XCTUnwrap(fixture.fieldsProcessor.setTagsInvocations.first)
236+
XCTAssertEqual(fixture.attributesProcessor.setTagsInvocations.count, 1)
237+
let invocation = try XCTUnwrap(fixture.attributesProcessor.setTagsInvocations.first)
238238
let invocationContext = try XCTUnwrap(invocation)
239239
XCTAssertEqual(invocationContext, tags)
240240
}
241241

242-
func testSetTraceContext_whenTraceContextIsNil_shouldCallFieldsProcessorSetTraceContext() throws {
242+
func testSetTraceContext_whenTraceContextIsNil_shouldCallAttributesProcessorSetTraceContext() throws {
243243
// -- Act --
244244
sut.setTraceContext(nil)
245245

246246
// -- Assert --
247-
XCTAssertEqual(fixture.fieldsProcessor.setTraceContextInvocations.count, 1)
248-
let invocation = try XCTUnwrap(fixture.fieldsProcessor.setTraceContextInvocations.first)
247+
XCTAssertEqual(fixture.attributesProcessor.setTraceContextInvocations.count, 1)
248+
let invocation = try XCTUnwrap(fixture.attributesProcessor.setTraceContextInvocations.first)
249249
XCTAssertNil(invocation)
250250
}
251251

252-
func testSetTraceContext_whenTraceContextIsDefined_shouldCallFieldsProcessorSetTraceContext() throws {
252+
func testSetTraceContext_whenTraceContextIsDefined_shouldCallAttributesProcessorSetTraceContext() throws {
253253
// -- Arrange --
254254
let traceContext = fixture.traceContext
255255

256256
// -- Act --
257257
sut.setTraceContext(traceContext)
258258

259259
// -- Assert --
260-
XCTAssertEqual(fixture.fieldsProcessor.setTraceContextInvocations.count, 1)
261-
let invocation = try XCTUnwrap(fixture.fieldsProcessor.setTraceContextInvocations.first)
260+
XCTAssertEqual(fixture.attributesProcessor.setTraceContextInvocations.count, 1)
261+
let invocation = try XCTUnwrap(fixture.attributesProcessor.setTraceContextInvocations.first)
262262
let invocationContext = try XCTUnwrap(invocation)
263263
XCTAssertEqual(NSDictionary(dictionary: invocationContext), NSDictionary(dictionary: traceContext))
264264
}

Tests/SentryTests/Integrations/WatchdogTerminations/SentryWatchdogTerminationTrackingIntegrationTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ class SentryWatchdogTerminationIntegrationTests: XCTestCase {
205205
XCTAssertEqual(fixture.watchdogTerminationAttributesProcessor.setEnvironmentInvocations.count, 2)
206206
let envInvocation = try XCTUnwrap(fixture.watchdogTerminationAttributesProcessor.setEnvironmentInvocations.last)
207207
XCTAssertEqual(envInvocation, "test")
208-
XCTAssertEqual(fixture.watchdogTerminationFieldsProcessor.setTagsInvocations.count, 2)
209-
let tagsInvocation = try XCTUnwrap(fixture.watchdogTerminationFieldsProcessor.setTagsInvocations.last)
208+
XCTAssertEqual(fixture.watchdogTerminationAttributesProcessor.setTagsInvocations.count, 2)
209+
let tagsInvocation = try XCTUnwrap(fixture.watchdogTerminationAttributesProcessor.setTagsInvocations.last)
210210
XCTAssertEqual(tagsInvocation, ["tag1": "value1", "tag2": "value2"])
211-
XCTAssertEqual(fixture.watchdogTerminationFieldsProcessor.setTraceContextInvocations.count, 2)
212-
let traceContextInvocation = try XCTUnwrap(fixture.watchdogTerminationFieldsProcessor.setTraceContextInvocations.last)
211+
XCTAssertEqual(fixture.watchdogTerminationAttributesProcessor.setTraceContextInvocations.count, 2)
212+
let traceContextInvocation = try XCTUnwrap(fixture.watchdogTerminationAttributesProcessor.setTraceContextInvocations.last)
213213
XCTAssertEqual(NSDictionary(dictionary: traceContextInvocation ?? [:]), NSDictionary(dictionary: ["trace_id": "12345678123456781234567812345678", "span_id": "1234567812345678"]))
214214
}
215215

0 commit comments

Comments
 (0)