Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Samples/iOS-SwiftUI/iOS-SwiftUI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ targets:
- ../Shared/SampleAssets.xcassets
- ../../Sources/Sentry/Public/SentrySerializable.h
- ../../Sources/Sentry/include/SentryTracer.h
- ../../Sources/Sentry/include/SentryPerformanceTracker.h
- ../../Sources/Sentry/Public/SentryProfilingConditionals.h
dependencies:
- target: Sentry/Sentry
Expand Down
2 changes: 1 addition & 1 deletion Samples/iOS-SwiftUI/iOS-SwiftUI/ContentView.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Sentry
@_spi(Private) import Sentry
import SentrySwiftUI
import SwiftUI

Expand Down Expand Up @@ -115,7 +115,7 @@
}

if DataBag.shared.info["lastSpan"] == nil {
let span = tracker.getSpan(currentSpanId)

Check failure on line 118 in Samples/iOS-SwiftUI/iOS-SwiftUI/ContentView.swift

View workflow job for this annotation

GitHub Actions / Sample iOS-SwiftUI DebugV9

'getSpan' is inaccessible due to 'internal' protection level

if !(span is SentryTracer) {
DataBag.shared.info["lastSpan"] = span
Expand Down
1 change: 1 addition & 0 deletions Samples/iOS-SwiftUI/iOS-SwiftUI/FormScreen.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Foundation
@_spi(Private) import Sentry
import SentrySwiftUI
import SwiftUI

Expand Down
1 change: 0 additions & 1 deletion Samples/iOS-SwiftUI/iOS-SwiftUI/bridging-headers.h
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#import "SentryPerformanceTracker.h"
#import "SentryTracer.h"
30 changes: 20 additions & 10 deletions Sentry.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -713,9 +713,9 @@
8EAC7FF8265C8910005B44E5 /* SentryTracerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EAC7FF7265C8910005B44E5 /* SentryTracerTests.swift */; };
8EAE8E5E2681768000D6958B /* URLSessionTaskMock.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EAE8E5D2681768000D6958B /* URLSessionTaskMock.m */; };
8EAE9806261E87120073B6B3 /* SentryUIViewControllerPerformanceTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EAE9804261E87120073B6B3 /* SentryUIViewControllerPerformanceTracker.m */; };
8EAE980B261E9F530073B6B3 /* SentryPerformanceTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 8EAE9809261E9F530073B6B3 /* SentryPerformanceTracker.h */; };
8EAE980B261E9F530073B6B3 /* SentryPerformanceTrackerHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 8EAE9809261E9F530073B6B3 /* SentryPerformanceTrackerHelper.h */; };
8EAE980C261E9F530073B6B3 /* SentryUIViewControllerPerformanceTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 8EAE980A261E9F530073B6B3 /* SentryUIViewControllerPerformanceTracker.h */; };
8EBF870926140D37001A6853 /* SentryPerformanceTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EBF870726140D37001A6853 /* SentryPerformanceTracker.m */; };
8EBF870926140D37001A6853 /* SentryPerformanceTrackerHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EBF870726140D37001A6853 /* SentryPerformanceTrackerHelper.m */; };
8EC3AE7A25CA23B600E7591A /* SentrySpan.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EC3AE7925CA23B600E7591A /* SentrySpan.m */; };
8EC4CF4A25C38DAA0093DEE9 /* SentrySpanStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 8EC4CF4725C38CAF0093DEE9 /* SentrySpanStatus.h */; settings = {ATTRIBUTES = (Public, ); }; };
8EC4CF5025C3A0070093DEE9 /* SentrySpanContextTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EC4CF4F25C3A0070093DEE9 /* SentrySpanContextTests.swift */; };
Expand Down Expand Up @@ -1082,6 +1082,7 @@
FA7206DF2E0B37850072FDD4 /* SentryProfileCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = FA7206DE2E0B37780072FDD4 /* SentryProfileCollector.h */; };
FA7206E12E0B37C80072FDD4 /* SentryProfileCollector.mm in Sources */ = {isa = PBXBuildFile; fileRef = FA7206E02E0B37C60072FDD4 /* SentryProfileCollector.mm */; };
FA8A36182DEAA1EB0058D883 /* SentryThread+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = FA8A36172DEAA1EB0058D883 /* SentryThread+Private.h */; };
FA8AFCDD2E842932007A0E18 /* SentryPerformanceTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8AFCDC2E84292E007A0E18 /* SentryPerformanceTracker.swift */; };
FA8AFCED2E8434A8007A0E18 /* SentryThreadInspector.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8AFCE72E8434A0007A0E18 /* SentryThreadInspector.swift */; };
FA8AFCEF2E843903007A0E18 /* SentryFileIOTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8AFCEE2E8438FF007A0E18 /* SentryFileIOTracker.swift */; };
FA8AFCFA2E844AB6007A0E18 /* SentryThreadsafeApplicationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA8AFCF42E844AB1007A0E18 /* SentryThreadsafeApplicationTests.swift */; };
Expand Down Expand Up @@ -2036,9 +2037,9 @@
8EAE8E5C2681768000D6958B /* URLSessionTaskMock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = URLSessionTaskMock.h; sourceTree = "<group>"; };
8EAE8E5D2681768000D6958B /* URLSessionTaskMock.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = URLSessionTaskMock.m; sourceTree = "<group>"; };
8EAE9804261E87120073B6B3 /* SentryUIViewControllerPerformanceTracker.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryUIViewControllerPerformanceTracker.m; sourceTree = "<group>"; };
8EAE9809261E9F530073B6B3 /* SentryPerformanceTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryPerformanceTracker.h; path = include/SentryPerformanceTracker.h; sourceTree = "<group>"; };
8EAE9809261E9F530073B6B3 /* SentryPerformanceTrackerHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryPerformanceTrackerHelper.h; path = include/SentryPerformanceTrackerHelper.h; sourceTree = "<group>"; };
8EAE980A261E9F530073B6B3 /* SentryUIViewControllerPerformanceTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentryUIViewControllerPerformanceTracker.h; path = include/SentryUIViewControllerPerformanceTracker.h; sourceTree = "<group>"; };
8EBF870726140D37001A6853 /* SentryPerformanceTracker.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryPerformanceTracker.m; sourceTree = "<group>"; };
8EBF870726140D37001A6853 /* SentryPerformanceTrackerHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryPerformanceTrackerHelper.m; sourceTree = "<group>"; };
8EC3AE7925CA23B600E7591A /* SentrySpan.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentrySpan.m; sourceTree = "<group>"; };
8EC4CF4725C38CAF0093DEE9 /* SentrySpanStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentrySpanStatus.h; path = Public/SentrySpanStatus.h; sourceTree = "<group>"; };
8EC4CF4F25C3A0070093DEE9 /* SentrySpanContextTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySpanContextTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2170,7 +2171,6 @@
D808FB89281BCE46009A2A33 /* TestSentrySwizzleWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestSentrySwizzleWrapper.swift; sourceTree = "<group>"; };
D808FB90281BF6E9009A2A33 /* SentryUIEventTrackingIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryUIEventTrackingIntegrationTests.swift; sourceTree = "<group>"; };
D80C990A2B0DFE410052F311 /* ExternalUIViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExternalUIViewController.swift; sourceTree = "<group>"; };
D8105B8D297FD16800299F03 /* SentryPerformanceTracker+Testing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SentryPerformanceTracker+Testing.h"; sourceTree = "<group>"; };
D8137D52272B53070082656C /* TestSentrySpan.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestSentrySpan.h; sourceTree = "<group>"; };
D8137D53272B53070082656C /* TestSentrySpan.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestSentrySpan.m; sourceTree = "<group>"; };
D81988BF2BEBFFF70020E36C /* SentryReplayRecording.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryReplayRecording.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2427,6 +2427,7 @@
FA7206DE2E0B37780072FDD4 /* SentryProfileCollector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentryProfileCollector.h; sourceTree = "<group>"; };
FA7206E02E0B37C60072FDD4 /* SentryProfileCollector.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = SentryProfileCollector.mm; sourceTree = "<group>"; };
FA8A36172DEAA1EB0058D883 /* SentryThread+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "SentryThread+Private.h"; path = "include/SentryThread+Private.h"; sourceTree = "<group>"; };
FA8AFCDC2E84292E007A0E18 /* SentryPerformanceTracker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryPerformanceTracker.swift; sourceTree = "<group>"; };
FA8AFCE72E8434A0007A0E18 /* SentryThreadInspector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryThreadInspector.swift; sourceTree = "<group>"; };
FA8AFCEE2E8438FF007A0E18 /* SentryFileIOTracker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryFileIOTracker.swift; sourceTree = "<group>"; };
FA8AFCF42E844AB1007A0E18 /* SentryThreadsafeApplicationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryThreadsafeApplicationTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3703,8 +3704,8 @@
8EA1ED092668F8C400E62B98 /* SentryUIViewControllerSwizzling.m */,
8EAE980A261E9F530073B6B3 /* SentryUIViewControllerPerformanceTracker.h */,
8EAE9804261E87120073B6B3 /* SentryUIViewControllerPerformanceTracker.m */,
8EAE9809261E9F530073B6B3 /* SentryPerformanceTracker.h */,
8EBF870726140D37001A6853 /* SentryPerformanceTracker.m */,
8EAE9809261E9F530073B6B3 /* SentryPerformanceTrackerHelper.h */,
8EBF870726140D37001A6853 /* SentryPerformanceTrackerHelper.m */,
D8BFE37029A3782F002E73F3 /* SentryTimeToDisplayTracker.h */,
D8BFE37129A3782F002E73F3 /* SentryTimeToDisplayTracker.m */,
);
Expand Down Expand Up @@ -3795,7 +3796,6 @@
7BF9EF8A2722D58700B5BBEF /* SentryInitializeForGettingSubclassesNotCalled.m */,
D8FFE50B2703DAAE00607131 /* SwizzlingCallTests.swift */,
7BE912B02721C76000E49E62 /* SentryPerformanceTrackingIntegrationTests.swift */,
D8105B8D297FD16800299F03 /* SentryPerformanceTracker+Testing.h */,
);
path = Performance;
sourceTree = "<group>";
Expand Down Expand Up @@ -4510,6 +4510,7 @@
isa = PBXGroup;
children = (
FAE57BF12E83049900B710F9 /* SentryDisplayLinkWrapper.swift */,
FA8AFCD62E84291F007A0E18 /* UIViewController */,
D468C0602D36699700964230 /* IO */,
);
path = Performance;
Expand Down Expand Up @@ -4903,6 +4904,14 @@
path = Core;
sourceTree = "<group>";
};
FA8AFCD62E84291F007A0E18 /* UIViewController */ = {
isa = PBXGroup;
children = (
FA8AFCDC2E84292E007A0E18 /* SentryPerformanceTracker.swift */,
);
path = UIViewController;
sourceTree = "<group>";
};
FABB48B22E59310D0071397E /* Transaction */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -5007,7 +5016,7 @@
63AA76991EB9C1C200D153DE /* SentryDefines.h in Headers */,
D86B6835294348A400B8B1FC /* SentryAttachment+Private.h in Headers */,
84AF45A629A7FFA500FBB177 /* SentryProfiledTracerConcurrency.h in Headers */,
8EAE980B261E9F530073B6B3 /* SentryPerformanceTracker.h in Headers */,
8EAE980B261E9F530073B6B3 /* SentryPerformanceTrackerHelper.h in Headers */,
F48F75732E5FA649009D4E7D /* SentryBinaryImageCacheCallbacks.h in Headers */,
63FE718520DA4C1100CDBAE8 /* SentryCrashC.h in Headers */,
8EA1ED0D2669028C00E62B98 /* SentryUIViewControllerSwizzling.h in Headers */,
Expand Down Expand Up @@ -5895,6 +5904,7 @@
63FE713120DA4C1100CDBAE8 /* SentryCrashDynamicLinker.c in Sources */,
03F84D3527DD4191008FE43F /* SentryThreadHandle.cpp in Sources */,
0A2D8DA9289BC905008720F6 /* SentryViewHierarchyProviderHelper.m in Sources */,
FA8AFCDD2E842932007A0E18 /* SentryPerformanceTracker.swift in Sources */,
D84D2CDD2C2BF7370011AF8A /* SentryReplayEvent.swift in Sources */,
D8BC28CC2BFF78220054DA4D /* SentryRRWebTouchEvent.swift in Sources */,
D452FC592DDB4B1700AFF56F /* SentryWatchdogTerminationBreadcrumbProcessor.m in Sources */,
Expand Down Expand Up @@ -5930,7 +5940,7 @@
621F61F12BEA073A005E654F /* SentryEnabledFeaturesBuilder.swift in Sources */,
D88817D826D7149100BF2251 /* SentryTraceContext.m in Sources */,
D8F67B1B2BE9728600C9197B /* SentrySRDefaultBreadcrumbConverter.swift in Sources */,
8EBF870926140D37001A6853 /* SentryPerformanceTracker.m in Sources */,
8EBF870926140D37001A6853 /* SentryPerformanceTrackerHelper.m in Sources */,
D865893029D6ECA7000BE151 /* SentryCrashBinaryImageCache.c in Sources */,
D859696B27BECD8F0036A46E /* SentryCoreDataTrackingIntegration.m in Sources */,
7BD86EC7264A641D005439DB /* SentrySysctlObjC.m in Sources */,
Expand Down
1 change: 0 additions & 1 deletion SentryTestUtils/SentryTestUtils-ObjC-BridgingHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#import "SentryHub+Test.h"
#import "SentryLogC.h"
#import "SentryNetworkTracker.h"
#import "SentryPerformanceTracker+Testing.h"
#import "SentrySDK+Private.h"
#import "SentrySDKInternal+Tests.h"
#import "SentryScopeSyncC.h"
Expand Down
1 change: 0 additions & 1 deletion Sources/Sentry/SentryDependencyContainer.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#import <SentryDebugImageProvider+HybridSDKs.h>
#import <SentryDefaultAppStateManager.h>
#import <SentryDependencyContainer.h>
#import <SentryPerformanceTracker.h>
#import <SentrySDK+Private.h>
#import <SentrySwift.h>
#import <SentrySwizzleWrapper.h>
Expand Down
1 change: 0 additions & 1 deletion Sources/Sentry/SentryHub.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#import "SentryLevelMapper.h"
#import "SentryLogC.h"
#import "SentryOptions+Private.h"
#import "SentryPerformanceTracker.h"
#import "SentryProfilingConditionals.h"
#import "SentrySDK+Private.h"
#import "SentrySamplerDecision.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#import "SentryPerformanceTracker.h"
#import "SentryPerformanceTrackerHelper.h"
#import "SentryDependencyContainer.h"
#import "SentryHub+Private.h"
#import "SentryLogC.h"
Expand All @@ -22,18 +22,17 @@

NS_ASSUME_NONNULL_BEGIN

@interface SentryPerformanceTracker () <SentryTracerDelegate>
@interface SentryPerformanceTrackerHelper () <SentryTracerDelegate>

@property (nonatomic, strong) NSMutableDictionary<SentrySpanId *, id<SentrySpan>> *spans;
@property (nonatomic, strong) NSMutableArray<id<SentrySpan>> *activeSpanStack;

@end

@implementation SentryPerformanceTracker
@implementation SentryPerformanceTrackerHelper

+ (SentryPerformanceTracker *)shared
+ (SentryPerformanceTrackerHelper *)shared
{
static SentryPerformanceTracker *instance = nil;
static SentryPerformanceTrackerHelper *instance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{ instance = [[self alloc] init]; });
return instance;
Expand All @@ -49,7 +48,7 @@ - (instancetype)init
}

- (SentrySpanId *)startSpanWithName:(NSString *)name
nameSource:(SentryTransactionNameSource)source
nameSource:(NSInteger)source
operation:(NSString *)operation
origin:(NSString *)origin
{
Expand Down Expand Up @@ -122,7 +121,7 @@ - (SentrySpanId *)startSpanWithName:(NSString *)name
}

- (void)measureSpanWithDescription:(NSString *)description
nameSource:(SentryTransactionNameSource)source
nameSource:(NSInteger)source
operation:(NSString *)operation
origin:(NSString *)origin
inBlock:(void (^)(void))block
Expand All @@ -140,7 +139,7 @@ - (void)measureSpanWithDescription:(NSString *)description
}

- (void)measureSpanWithDescription:(NSString *)description
nameSource:(SentryTransactionNameSource)source
nameSource:(NSInteger)source
operation:(NSString *)operation
origin:(NSString *)origin
parentSpanId:(SentrySpanId *)parentSpanId
Expand Down
7 changes: 3 additions & 4 deletions Sources/Sentry/SentryUIViewControllerPerformanceTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# import "SentryHub.h"
# import "SentryLogC.h"
# import "SentryOptions.h"
# import "SentryPerformanceTracker.h"
# import "SentrySDK+Private.h"
# import "SentrySpanId.h"
# import "SentrySpanOperation.h"
Expand Down Expand Up @@ -198,7 +197,7 @@ - (void)startRootSpanFor:(UIViewController *)controller

spanId = [self getSpanIdForViewController:controller];
SentrySpan *_Nullable vcSpan
= (SentrySpan *)[self.tracker getSpan:SENTRY_UNWRAP_NULLABLE(SentrySpanId, spanId)];
= (SentrySpan *)[self.tracker getSpanForObjc:SENTRY_UNWRAP_NULLABLE(SentrySpanId, spanId)];

if (![vcSpan isKindOfClass:[SentryTracer self]]) {
// Since TTID and TTFD are meant to the whole screen
Expand Down Expand Up @@ -274,7 +273,7 @@ - (SentrySwiftUISpanHelper *)startTimeToDisplayTrackerForScreen:(NSString *)scre
waitForFullDisplay:(BOOL)waitforFullDisplay
transactionId:(SentrySpanId *)transactionId;
{
id<SentrySpan> span = [SentryPerformanceTracker.shared getSpan:transactionId];
id<SentrySpan> span = [SentryPerformanceTracker.shared getSpanForObjc:transactionId];
if (span != nil && [span isKindOfClass:[SentryTracer class]]) {
id<SentryInitialDisplayReporting> displayReporting =
[self startTimeToDisplayTrackerForScreen:screenName
Expand Down Expand Up @@ -389,7 +388,7 @@ - (void)finishTransaction:(UIViewController *)controller
};

[self.tracker activateSpan:spanId duringBlock:duringBlock];
id<SentrySpan> vcSpan = [self.tracker getSpan:spanId];
id<SentrySpan> vcSpan = [self.tracker getSpanForObjc:spanId];
// If the current controller span has no parent,
// it means it is the root transaction and need to be pop from the queue.
if (vcSpan.parentSpanId == nil) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@ NS_ASSUME_NONNULL_BEGIN
* Tracks performance synchronizing span with its child's.
* @note A span will be finished only when all its children are finished.
*/
@interface SentryPerformanceTracker : NSObject
@interface SentryPerformanceTrackerHelper : NSObject

/**
* A static instance of performance tracker.
*/
@property (nonatomic, class, readonly) SentryPerformanceTracker *shared;
@property (nonatomic, class, readonly) SentryPerformanceTrackerHelper *shared;

@property (nonatomic, strong) NSMutableArray<id<SentrySpan>> *activeSpanStack;

/**
* Starts a new span if no span is active, then bind it to the scope if no span is bound.
* @note If there's an active span, starts a child of the active span.
* @param name Span name.
* @param source the transaction name source.
* @param source the transaction name source, this is expected to be a value of SentryTransactionNameSource.
* @param operation Span operation.
* @return The span id.
*/
- (SentrySpanId *)startSpanWithName:(NSString *)name
nameSource:(SentryTransactionNameSource)source
nameSource:(NSInteger)source
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind adding that the source is expected to be a value of SentryTransactionNameSource?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also maybe explain why we can't use it here in the comment please.

operation:(NSString *)operation
origin:(NSString *)origin;

Expand All @@ -40,12 +42,12 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Measure the given @c block execution.
* @param description The description of the span.
* @param source the transaction name source.
* @param source the transaction name source, this is expected to be a value of SentryTransactionNameSource.
* @param operation Span operation.
* @param block Block to be measured.
*/
- (void)measureSpanWithDescription:(NSString *)description
nameSource:(SentryTransactionNameSource)source
nameSource:(NSInteger)source
operation:(NSString *)operation
origin:(NSString *)origin
inBlock:(void (^)(void))block;
Expand All @@ -54,13 +56,13 @@ NS_ASSUME_NONNULL_BEGIN
* Measure the given @c block execution adding it as a child of given parent span.
* @note If @c parentSpanId does not exist this measurement is not performed.
* @param description The description of the span.
* @param source the transaction name source.
* @param source the transaction name source, this is expected to be a value of SentryTransactionNameSource.
* @param operation Span operation.
* @param parentSpanId Id of the span to use as parent.
* @param block Block to be measured.
*/
- (void)measureSpanWithDescription:(NSString *)description
nameSource:(SentryTransactionNameSource)source
nameSource:(NSInteger)source
operation:(NSString *)operation
origin:(NSString *)origin
parentSpanId:(SentrySpanId *)parentSpanId
Expand Down Expand Up @@ -108,6 +110,8 @@ NS_ASSUME_NONNULL_BEGIN

- (void)popActiveSpan;

- (void)clear;

@end

NS_ASSUME_NONNULL_END
Loading
Loading