Skip to content

Commit

Permalink
Merge 25f9740 into df2835d
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase authored Aug 14, 2024
2 parents df2835d + 25f9740 commit dd1b7f2
Show file tree
Hide file tree
Showing 21 changed files with 88 additions and 44 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Pause replay in session mode when offline (#4264)
- Add replay quality option for Objective-C (#4267)
- Expose span baggage API (#4207)

### Fixes

Expand Down
8 changes: 4 additions & 4 deletions Sentry.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@
D859697327BECDD20036A46E /* SentryCoreDataSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = D859697127BECDD20036A46E /* SentryCoreDataSwizzling.m */; };
D85D3BEA278DF63D001B2889 /* SentryByteCountFormatterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D85D3BE9278DF63D001B2889 /* SentryByteCountFormatterTests.swift */; };
D8603DD6284F8497000E1227 /* SentryBaggage.m in Sources */ = {isa = PBXBuildFile; fileRef = D8603DD4284F8497000E1227 /* SentryBaggage.m */; };
D8603DD8284F894C000E1227 /* SentryBaggage.h in Headers */ = {isa = PBXBuildFile; fileRef = D8603DD7284F894C000E1227 /* SentryBaggage.h */; };
D8603DD8284F894C000E1227 /* SentryBaggage.h in Headers */ = {isa = PBXBuildFile; fileRef = D8603DD7284F894C000E1227 /* SentryBaggage.h */; settings = {ATTRIBUTES = (Public, ); }; };
D86130122BB563FD004C0F5E /* SentrySessionReplayIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D86130112BB563FD004C0F5E /* SentrySessionReplayIntegrationTests.swift */; };
D861301C2BB5A267004C0F5E /* SentrySessionReplayTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D861301B2BB5A267004C0F5E /* SentrySessionReplayTests.swift */; };
D865892F29D6ECA7000BE151 /* SentryCrashBinaryImageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = D865892D29D6ECA7000BE151 /* SentryCrashBinaryImageCache.h */; };
Expand All @@ -863,7 +863,7 @@
D885266427739D01001269FC /* SentryFileIOTrackingIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D885266327739D01001269FC /* SentryFileIOTrackingIntegrationTests.swift */; };
D8853C842833EABC00700D64 /* SentryANRTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BCFA71427D0BAB7008C662C /* SentryANRTracker.h */; };
D88817D826D7149100BF2251 /* SentryTraceContext.m in Sources */ = {isa = PBXBuildFile; fileRef = D88817D626D7149100BF2251 /* SentryTraceContext.m */; };
D88817DA26D72AB800BF2251 /* SentryTraceContext.h in Headers */ = {isa = PBXBuildFile; fileRef = D88817D926D72AB800BF2251 /* SentryTraceContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
D88817DA26D72AB800BF2251 /* SentryTraceContext.h in Headers */ = {isa = PBXBuildFile; fileRef = D88817D926D72AB800BF2251 /* SentryTraceContext.h */; settings = {ATTRIBUTES = (Public, ); }; };
D88817DD26D72BA500BF2251 /* SentryTraceStateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D88817DB26D72B7B00BF2251 /* SentryTraceStateTests.swift */; };
D8918B222849FA6D00701F9A /* SentrySDKIntegrationTestsBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8918B212849FA6D00701F9A /* SentrySDKIntegrationTestsBase.swift */; };
D8AB40DB2806EC1900E5E9F7 /* SentryScreenshotIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = D8AB40DA2806EC1900E5E9F7 /* SentryScreenshotIntegration.h */; };
Expand Down Expand Up @@ -1903,7 +1903,7 @@
D859697127BECDD20036A46E /* SentryCoreDataSwizzling.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryCoreDataSwizzling.m; sourceTree = "<group>"; };
D85D3BE9278DF63D001B2889 /* SentryByteCountFormatterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryByteCountFormatterTests.swift; sourceTree = "<group>"; };
D8603DD4284F8497000E1227 /* SentryBaggage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryBaggage.m; sourceTree = "<group>"; };
D8603DD7284F894C000E1227 /* SentryBaggage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryBaggage.h; path = include/SentryBaggage.h; sourceTree = "<group>"; };
D8603DD7284F894C000E1227 /* SentryBaggage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryBaggage.h; path = Public/SentryBaggage.h; sourceTree = "<group>"; };
D86130112BB563FD004C0F5E /* SentrySessionReplayIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySessionReplayIntegrationTests.swift; sourceTree = "<group>"; };
D861301B2BB5A267004C0F5E /* SentrySessionReplayTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySessionReplayTests.swift; sourceTree = "<group>"; };
D865892D29D6ECA7000BE151 /* SentryCrashBinaryImageCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryCrashBinaryImageCache.h; sourceTree = "<group>"; };
Expand All @@ -1930,7 +1930,7 @@
D884A20327C80F2700074664 /* SentryCoreDataTrackerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryCoreDataTrackerTest.swift; sourceTree = "<group>"; };
D885266327739D01001269FC /* SentryFileIOTrackingIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryFileIOTrackingIntegrationTests.swift; sourceTree = "<group>"; };
D88817D626D7149100BF2251 /* SentryTraceContext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryTraceContext.m; sourceTree = "<group>"; };
D88817D926D72AB800BF2251 /* SentryTraceContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryTraceContext.h; path = include/SentryTraceContext.h; sourceTree = "<group>"; };
D88817D926D72AB800BF2251 /* SentryTraceContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryTraceContext.h; path = Public/SentryTraceContext.h; sourceTree = "<group>"; };
D88817DB26D72B7B00BF2251 /* SentryTraceStateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryTraceStateTests.swift; sourceTree = "<group>"; };
D88D25E92B8E0BAC0073C3D5 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; };
D8918B212849FA6D00701F9A /* SentrySDKIntegrationTestsBase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySDKIntegrationTestsBase.swift; sourceTree = "<group>"; };
Expand Down
10 changes: 5 additions & 5 deletions SentryTestUtils/TestTransportAdapter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ public class TestTransportAdapter: SentryTransportAdapter {
self.send(event, with: session, traceContext: nil, attachments: attachments)
}

public var sentEventsWithSessionTraceState = Invocations<(event: Event, session: SentrySession, traceContext: SentryTraceContext?, attachments: [Attachment])>()
public override func send(_ event: Event, with session: SentrySession, traceContext: SentryTraceContext?, attachments: [Attachment]) {
public var sentEventsWithSessionTraceState = Invocations<(event: Event, session: SentrySession, traceContext: TraceContext?, attachments: [Attachment])>()
public override func send(_ event: Event, with session: SentrySession, traceContext: TraceContext?, attachments: [Attachment]) {
sentEventsWithSessionTraceState.record((event, session, traceContext, attachments))
}

public var sendEventWithTraceStateInvocations = Invocations<(event: Event, traceContext: SentryTraceContext?, attachments: [Attachment], additionalEnvelopeItems: [SentryEnvelopeItem])>()
public override func send(event: Event, traceContext: SentryTraceContext?, attachments: [Attachment]) {
public var sendEventWithTraceStateInvocations = Invocations<(event: Event, traceContext: TraceContext?, attachments: [Attachment], additionalEnvelopeItems: [SentryEnvelopeItem])>()
public override func send(event: Event, traceContext: TraceContext?, attachments: [Attachment]) {
sendEventWithTraceStateInvocations.record((event, traceContext, attachments, []))
}

public override func send(event: Event, traceContext: SentryTraceContext?, attachments: [Attachment], additionalEnvelopeItems: [SentryEnvelopeItem]) {
public override func send(event: Event, traceContext: TraceContext?, attachments: [Attachment], additionalEnvelopeItems: [SentryEnvelopeItem]) {
sendEventWithTraceStateInvocations.record((event, traceContext, attachments, additionalEnvelopeItems))
}

Expand Down
2 changes: 2 additions & 0 deletions Sources/Sentry/Public/Sentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ FOUNDATION_EXPORT double SentryVersionNumber;
FOUNDATION_EXPORT const unsigned char SentryVersionString[];

# import <Sentry/SentryAttachment.h>
# import <Sentry/SentryBaggage.h>
# import <Sentry/SentryBreadcrumb.h>
# import <Sentry/SentryClient.h>
# import <Sentry/SentryCrashExceptionApplication.h>
Expand Down Expand Up @@ -41,6 +42,7 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[];
# import <Sentry/SentrySpanStatus.h>
# import <Sentry/SentryStacktrace.h>
# import <Sentry/SentryThread.h>
# import <Sentry/SentryTraceContext.h>
# import <Sentry/SentryTraceHeader.h>
# import <Sentry/SentryTransactionContext.h>
# import <Sentry/SentryUser.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ NS_ASSUME_NONNULL_BEGIN

static NSString *const SENTRY_BAGGAGE_HEADER = @"baggage";

NS_SWIFT_NAME(Baggage)
@interface SentryBaggage : NSObject

/*
Expand Down
14 changes: 12 additions & 2 deletions Sources/Sentry/Public/SentrySpanProtocol.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#import "SentryDefines.h"
#import "SentrySerializable.h"
#import "SentrySpanContext.h"

NS_ASSUME_NONNULL_BEGIN

@class SentrySpanId, SentryId, SentryTraceHeader, SentryMeasurementUnit;
@class SentrySpanId, SentryId, SentryTraceHeader, SentryMeasurementUnit, SentryTraceContext;

NS_SWIFT_NAME(Span)
@protocol SentrySpan <SentrySerializable>
Expand Down Expand Up @@ -80,6 +79,11 @@ NS_SWIFT_NAME(Span)
*/
@property (readonly) BOOL isFinished;

/**
* Retrieves a trace context from this tracer.
*/
@property (nullable, nonatomic, readonly) SentryTraceContext *traceContext;

/**
* Starts a child span.
* @param operation Short code identifying the type of operation the span is measuring.
Expand Down Expand Up @@ -167,6 +171,12 @@ NS_SWIFT_NAME(Span)
*/
- (SentryTraceHeader *)toTraceHeader;

/**
* Returns the baggage http header
* @return NSString.
*/
- (nullable NSString *)baggageHttpHeader;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ NS_ASSUME_NONNULL_BEGIN
@class SentryScope, SentryOptions, SentryTracer, SentryUser, SentryBaggage;
@class SentryId;

NS_SWIFT_NAME(TraceContext)
@interface SentryTraceContext : NSObject <SentrySerializable>

/**
Expand Down
2 changes: 2 additions & 0 deletions Sources/Sentry/Public/SentryWithoutUIKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[];

# import <SentryWithoutUIKit/Sentry.h>
# import <SentryWithoutUIKit/SentryAttachment.h>
# import <SentryWithoutUIKit/SentryBaggage.h>
# import <SentryWithoutUIKit/SentryBreadcrumb.h>
# import <SentryWithoutUIKit/SentryClient.h>
# import <SentryWithoutUIKit/SentryCrashExceptionApplication.h>
Expand Down Expand Up @@ -42,6 +43,7 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[];
# import <SentryWithoutUIKit/SentrySpanStatus.h>
# import <SentryWithoutUIKit/SentryStacktrace.h>
# import <SentryWithoutUIKit/SentryThread.h>
# import <SentryWithoutUIKit/SentryTraceContext.h>
# import <SentryWithoutUIKit/SentryTraceHeader.h>
# import <SentryWithoutUIKit/SentryTransactionContext.h>
# import <SentryWithoutUIKit/SentryUser.h>
Expand Down
13 changes: 13 additions & 0 deletions Sources/Sentry/SentrySpan.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#import "SentryBaggage.h"
#import "SentryCrashThread.h"
#import "SentryDependencyContainer.h"
#import "SentryFrame.h"
Expand All @@ -13,6 +14,7 @@
#import "SentrySwift.h"
#import "SentryThreadInspector.h"
#import "SentryTime.h"
#import "SentryTraceContext.h"
#import "SentryTraceHeader.h"
#import "SentryTracer.h"

Expand Down Expand Up @@ -298,6 +300,17 @@ - (SentryTraceHeader *)toTraceHeader
sampled:self.sampled];
}

// Getter for the computed property baggage
- (nullable NSString *)baggageHttpHeader
{
return [[self.tracer.traceContext toBaggage] toHTTPHeaderWithOriginalBaggage:nil];
}

- (nullable SentryTraceContext *)traceContext
{
return self.tracer.traceContext;
}

- (LocalMetricsAggregator *)getLocalMetricsAggregator
{
if (localMetricsAggregator == nil) {
Expand Down
11 changes: 7 additions & 4 deletions Sources/Sentry/SentryTracer.m
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,17 @@ - (void)spanFinished:(id<SentrySpan>)finishedSpan
[self canBeFinished];
}

- (SentryTraceContext *)traceContext
- (nullable SentryTraceContext *)traceContext
{
if (_traceContext == nil) {
@synchronized(self) {
if (_traceContext == nil) {
_traceContext = [[SentryTraceContext alloc] initWithTracer:self
scope:_hub.scope
options:SentrySDK.options];
_traceContext = [[SentryTraceContext alloc]
initWithTracer:self
scope:_hub.scope
options:_hub.client.options
?: SentrySDK.options]; // We should remove static classes and always
// inject dependencies.
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Sentry/include/HybridPublic/SentryEnvelope.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#import "PrivatesHeader.h"

#if COCOAPODS
@class SentrySdkInfo, SentryTraceContext;
@class SentrySdkInfo;
#else
# import "SentrySdkInfo.h"
# import "SentryTraceContext.h"

#endif

Expand All @@ -14,6 +13,7 @@
@class SentryUserFeedback;
@class SentryAttachment;
@class SentryEnvelopeItemHeader;
@class SentryTraceContext;

NS_ASSUME_NONNULL_BEGIN

Expand Down
5 changes: 0 additions & 5 deletions Sources/Sentry/include/SentryTracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ static const NSTimeInterval SENTRY_AUTO_TRANSACTION_MAX_DURATION = 500.0;

@property (nullable, nonatomic, copy) BOOL (^shouldIgnoreWaitForChildrenCallback)(id<SentrySpan>);

/**
* Retrieves a trace context from this tracer.
*/
@property (nonatomic, readonly) SentryTraceContext *traceContext;

/**
* All the spans that where created with this tracer but rootSpan.
*/
Expand Down
6 changes: 3 additions & 3 deletions Tests/SentryTests/Helper/SentrySerializationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class SentrySerializationTests: XCTestCase {

private class Fixture {
static var invalidData = "hi".data(using: .utf8)!
static var traceContext = SentryTraceContext(trace: SentryId(), publicKey: "PUBLIC_KEY", releaseName: "RELEASE_NAME", environment: "TEST", transaction: "transaction", userSegment: "some segment", sampleRate: "0.25", sampled: "true", replayId: nil)
static var traceContext = TraceContext(trace: SentryId(), publicKey: "PUBLIC_KEY", releaseName: "RELEASE_NAME", environment: "TEST", transaction: "transaction", userSegment: "some segment", sampleRate: "0.25", sampled: "true", replayId: nil)
}

func testSerializationFailsWithInvalidJSONObject() {
Expand Down Expand Up @@ -119,7 +119,7 @@ class SentrySerializationTests: XCTestCase {
}

func testSentryEnvelopeSerializer_TraceStateWithoutUser() throws {
let trace = SentryTraceContext(trace: SentryId(), publicKey: "PUBLIC_KEY", releaseName: "RELEASE_NAME", environment: "TEST", transaction: "transaction", userSegment: nil, sampleRate: nil, sampled: nil, replayId: nil)
let trace = TraceContext(trace: SentryId(), publicKey: "PUBLIC_KEY", releaseName: "RELEASE_NAME", environment: "TEST", transaction: "transaction", userSegment: nil, sampleRate: nil, sampled: nil, replayId: nil)

let envelopeHeader = SentryEnvelopeHeader(id: nil, traceContext: trace)
let envelope = SentryEnvelope(header: envelopeHeader, singleItem: createItemWithEmptyAttachment())
Expand Down Expand Up @@ -288,7 +288,7 @@ class SentrySerializationTests: XCTestCase {
XCTAssertEqual(sdkInfo, deserializedEnvelope.header.sdkInfo)
}

func assertTraceState(firstTrace: SentryTraceContext, secondTrace: SentryTraceContext) {
func assertTraceState(firstTrace: TraceContext, secondTrace: TraceContext) {
XCTAssertEqual(firstTrace.traceId, secondTrace.traceId)
XCTAssertEqual(firstTrace.publicKey, secondTrace.publicKey)
XCTAssertEqual(firstTrace.releaseName, secondTrace.releaseName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class SentryNetworkTrackerIntegrationTests: XCTestCase {
self.assertNetworkError(error)
let response = String(data: data ?? Data(), encoding: .utf8) ?? ""

let expectedBaggageHeader = transaction.traceContext.toBaggage().toHTTPHeader(withOriginalBaggage: nil)
let expectedBaggageHeader = transaction.traceContext?.toBaggage().toHTTPHeader(withOriginalBaggage: nil)
XCTAssertEqual(expectedBaggageHeader, response)

expect.fulfill()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ class SentryNetworkTrackerTests: XCTestCase {
let transaction = try XCTUnwrap(startTransaction() as? SentryTracer)
sut.urlSessionTaskResume(task)

let expectedBaggageHeader = transaction.traceContext.toBaggage().toHTTPHeader(withOriginalBaggage: nil)
let expectedBaggageHeader = transaction.traceContext?.toBaggage().toHTTPHeader(withOriginalBaggage: nil)
XCTAssertEqual(task.currentRequest?.allHTTPHeaderFields?["baggage"] ?? "", expectedBaggageHeader)
}

Expand Down Expand Up @@ -715,7 +715,7 @@ class SentryNetworkTrackerTests: XCTestCase {
sut.urlSessionTaskResume(task)

let expectedTraceHeader = SentrySDK.currentHub().scope.propagationContext.traceHeader.value()
let traceContext = SentryTraceContext(trace: SentrySDK.currentHub().scope.propagationContext.traceId, options: self.fixture.options, userSegment: self.fixture.scope.userObject?.segment, replayId: nil)
let traceContext = TraceContext(trace: SentrySDK.currentHub().scope.propagationContext.traceId, options: self.fixture.options, userSegment: self.fixture.scope.userObject?.segment, replayId: nil)
let expectedBaggageHeader = traceContext.toBaggage().toHTTPHeader(withOriginalBaggage: nil)
XCTAssertEqual(task.currentRequest?.allHTTPHeaderFields?["baggage"] ?? "", expectedBaggageHeader)
XCTAssertEqual(task.currentRequest?.allHTTPHeaderFields?["sentry-trace"] ?? "", expectedTraceHeader)
Expand All @@ -728,7 +728,7 @@ class SentryNetworkTrackerTests: XCTestCase {
sut.urlSessionTaskResume(task)

let expectedTraceHeader = SentrySDK.currentHub().scope.propagationContext.traceHeader.value()
let traceContext = SentryTraceContext(trace: SentrySDK.currentHub().scope.propagationContext.traceId, options: self.fixture.options, userSegment: self.fixture.scope.userObject?.segment, replayId: nil)
let traceContext = TraceContext(trace: SentrySDK.currentHub().scope.propagationContext.traceId, options: self.fixture.options, userSegment: self.fixture.scope.userObject?.segment, replayId: nil)
let expectedBaggageHeader = traceContext.toBaggage().toHTTPHeader(withOriginalBaggage: nil)
XCTAssertEqual(task.currentRequest?.allHTTPHeaderFields?["baggage"] ?? "", expectedBaggageHeader)
XCTAssertEqual(task.currentRequest?.allHTTPHeaderFields?["sentry-trace"] ?? "", expectedTraceHeader)
Expand Down
2 changes: 1 addition & 1 deletion Tests/SentryTests/Protocol/SentryEnvelopeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class SentryEnvelopeTests: XCTestCase {

func testInitSentryEnvelopeHeader_SetIdAndTraceState() {
let eventId = SentryId()
let traceContext = SentryTraceContext(trace: SentryId(), publicKey: "publicKey", releaseName: "releaseName", environment: "environment", transaction: "transaction", userSegment: nil, sampleRate: nil, sampled: nil, replayId: nil)
let traceContext = TraceContext(trace: SentryId(), publicKey: "publicKey", releaseName: "releaseName", environment: "environment", transaction: "transaction", userSegment: nil, sampleRate: nil, sampled: nil, replayId: nil)

let envelopeHeader = SentryEnvelopeHeader(id: eventId, traceContext: traceContext)
XCTAssertEqual(eventId, envelopeHeader.eventId)
Expand Down
2 changes: 1 addition & 1 deletion Tests/SentryTests/SentryClientTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ class SentryClientTest: XCTestCase {
try assertValidErrorEvent(eventWithSessionArguments.event, error)
XCTAssertEqual(fixture.session, eventWithSessionArguments.session)

let expectedTraceContext = SentryTraceContext(trace: scope.propagationContext.traceId, options: Options(), userSegment: "segment", replayId: nil)
let expectedTraceContext = TraceContext(trace: scope.propagationContext.traceId, options: Options(), userSegment: "segment", replayId: nil)
XCTAssertEqual(eventWithSessionArguments.traceContext?.traceId,
expectedTraceContext.traceId)
}
Expand Down
Loading

0 comments on commit dd1b7f2

Please sign in to comment.