Skip to content
Open
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
a43e535
ref: Extract getAppStartMeasurement into SentryAppStartMeasurementPro…
philipphofmann Mar 9, 2026
2d02876
ref: Remove resetAppStartMeasurementRead from SentryTracer
philipphofmann Mar 9, 2026
ba85ba9
ref: Clean up app start measurement provider API
philipphofmann Mar 10, 2026
ec54453
fix: Remove leftover profilerReferenceID in concurrency test
philipphofmann Mar 10, 2026
4d7bfa8
fix: Fix compilation errors in app start measurement provider tests
philipphofmann Mar 10, 2026
87017a5
feat: Add enableStandaloneAppStartTracing option
philipphofmann Mar 5, 2026
b31cbf5
feat: Implement standalone app start transaction
philipphofmann Mar 5, 2026
2cad1fb
ref: Pass standalone flag to sentryBuildAppStartSpans
philipphofmann Mar 5, 2026
244ad48
ref: Extract isStandaloneAppStartTransaction method
philipphofmann Mar 5, 2026
6427ad5
ref: Check origin in isStandaloneAppStartTransaction
philipphofmann Mar 5, 2026
683fc13
ref: Move standalone app start check to Swift helper
philipphofmann Mar 5, 2026
81c03f0
ref: Use SentrySpan protocol in app start spans
philipphofmann Mar 5, 2026
51dc82b
fix linter
philipphofmann Mar 5, 2026
d4918cb
test: Add standalone app start span building tests
philipphofmann Mar 9, 2026
db3ef7e
feat: Guard standalone app start transaction on SDK enabled
philipphofmann Mar 9, 2026
8211d93
ref: Pass app start measurement via tracer configuration
philipphofmann Mar 9, 2026
89686ca
test: Assert span names and operations in standalone test
philipphofmann Mar 9, 2026
985fdd0
test: Improve standalone app start global measurement test
philipphofmann Mar 9, 2026
78e9ab3
fix: Mark app start measurement as read in standalone path
philipphofmann Mar 9, 2026
df35dee
feat: Add changelog entry for standalone app start tracing
philipphofmann Mar 10, 2026
e0b4ea4
ref: Clarify markAsRead comment as safeguard
philipphofmann Mar 10, 2026
8106a64
fix: Remove trailing commas unsupported by CI Swift version
philipphofmann Mar 10, 2026
661d309
ref: Move SDK enabled guard to top of handle method
philipphofmann Mar 10, 2026
462b028
ref: Log error for unknown app start type
philipphofmann Mar 10, 2026
0c44cc8
ref: Reference SentryAppStartMeasurementProvider in comment
philipphofmann Mar 10, 2026
868d726
ref: Log error for unknown app start type in span builder
philipphofmann Mar 10, 2026
a0c07a6
ref: Simplify unknown app start type log message
philipphofmann Mar 10, 2026
fc55e12
ref: Simplify unknown app start type log in Swift
philipphofmann Mar 10, 2026
a1e88d1
ref: Extract AppStartMeasurementHandler into own file
philipphofmann Mar 10, 2026
529e78a
test: Add tests for AppStartMeasurementHandler
philipphofmann Mar 10, 2026
ed652f5
ref: Split sentryBuildAppStartSpans into two methods
philipphofmann Mar 10, 2026
2799506
test: Add integration tests for standalone app start
philipphofmann Mar 10, 2026
6a7e677
test: Add missing import for _SentryPrivate
philipphofmann Mar 10, 2026
8ba3510
test: Replace clearTestState with targeted cleanup
philipphofmann Mar 10, 2026
5106df6
test: Add span validation for standalone app start
philipphofmann Mar 10, 2026
58d04f0
fix: Fix flaky tests by restoring clearTestState and using serialized…
philipphofmann Mar 10, 2026
d11bf49
feat: Track standalone app start tracing in enabled features
philipphofmann Mar 10, 2026
c7d58ca
ref: address PR review comments
philipphofmann Mar 10, 2026
15b9564
fix: Add visionOS to platform guards in clearTestState
philipphofmann Mar 10, 2026
027eef2
build: update public API after adding experimental option
philipphofmann Mar 10, 2026
4740d03
Merge branch 'main' into feat/standalone-app-start-tracing
philipphofmann Mar 12, 2026
98fbbed
changelog
philipphofmann Mar 12, 2026
8b3d6f2
ref: Remove forward declarations in SentryBuildAppStartSpans
philipphofmann Mar 12, 2026
4819275
ref: Move isStandaloneAppStartTransaction to UIKit section
philipphofmann Mar 12, 2026
d0d815e
ref: Rename AppStartMeasurementHandler to AppStartReportingStrategy
philipphofmann Mar 12, 2026
f525749
fix: Address review feedback for standalone app start tracing
philipphofmann Mar 12, 2026
9d19a2a
test: Use targeted cleanup instead of blanket clearTestState
philipphofmann Mar 12, 2026
973cc2f
test: Fix test conventions from develop-docs review
philipphofmann Mar 12, 2026
3ac8825
test: Add integration test for standalone app start tracing
philipphofmann Mar 12, 2026
ade227c
test: Add coverage for standalone app start edge cases
philipphofmann Mar 12, 2026
a243fa7
fix: Remove standalone tracing from sample, fix endif comment
philipphofmann Mar 12, 2026
00e0d76
Merge branch 'main' into feat/standalone-app-start-tracing
philipphofmann Mar 13, 2026
b3bf65e
Merge branch 'main' of github.com:getsentry/sentry-cocoa into feat/st…
itaybre May 5, 2026
aadd14e
Merge branch 'main' of github.com:getsentry/sentry-cocoa into feat/st…
itaybre May 7, 2026
c8f089a
Add SDK override for standalone app start
itaybre May 11, 2026
c87b2d3
Use `app.vitals.*` conventions
itaybre May 11, 2026
a59c367
Small fixes
itaybre May 11, 2026
c0be6c1
Add tests
itaybre May 11, 2026
a4bdd0f
Merge branch 'main' of github.com:getsentry/sentry-cocoa into feat/st…
itaybre May 11, 2026
eae8893
chore: move changelog entry to unreleased section
itaybre May 11, 2026
764f45e
fix(test): use correct measurement key in markAsRead test
itaybre May 11, 2026
39f4d4c
feat: implement app start trace ID and screen name handling
itaybre May 12, 2026
90ffe5e
fix: guard app start trace ID usage with SENTRY_HAS_UIKIT
itaybre May 12, 2026
d731019
ref: replace C factory functions with named category
itaybre May 13, 2026
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Features

- Add standalone app start tracing as an experimental option (#7660), enable it via `options.experimental.enableStandaloneAppStartTracing = true`

## 9.13.0

### Fixes
Expand All @@ -9,6 +15,7 @@

### Features

- Prevent memory strings in stack overflow crash reports (#7841)
Comment thread
cursor[bot] marked this conversation as resolved.
- Add Set conformance to SentryAttributeValue (#7876)

## 9.12.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public enum SentrySDKOverrides: String, CaseIterable {
case disableWatchdogTracking = "--io.sentry.performance.disable-watchdog-tracking"
case disableUITracing = "--io.sentry.performance.disable-ui-tracing"
case disablePrewarmedAppStartTracing = "--io.sentry.performance.disable-prewarmed-app-start-tracing"
case enableStandaloneAppStartTracing = "--io.sentry.performance.enable-standalone-app-start-tracing"
case disablePerformanceTracing = "--io.sentry.performance.disable-auto-performance-tracing"
case sessionTrackingIntervalMillis = "--io.sentry.performance.sessionTrackingIntervalMillis"
}
Expand Down Expand Up @@ -312,7 +313,7 @@ extension SentrySDKOverrides.Other {
extension SentrySDKOverrides.Performance {
public var overrideType: OverrideType {
switch self {
case .disableTimeToFullDisplayTracing, .disableSessionTracking, .disableFileIOTracing, .disableUIVCTracing, .disableCoreDataTracing, .disableANRTracking, .disableWatchdogTracking, .disableUITracing, .disablePrewarmedAppStartTracing, .disablePerformanceTracing: return .boolean
case .disableTimeToFullDisplayTracing, .disableSessionTracking, .disableFileIOTracing, .disableUIVCTracing, .disableCoreDataTracing, .disableANRTracking, .disableWatchdogTracking, .disableUITracing, .disablePrewarmedAppStartTracing, .enableStandaloneAppStartTracing, .disablePerformanceTracing: return .boolean
case .sessionTrackingIntervalMillis: return .string
}
}
Expand Down Expand Up @@ -408,7 +409,7 @@ extension SentrySDKOverrides.Other {
extension SentrySDKOverrides.Performance {
public var ignoresDisableEverything: Bool {
switch self {
case .disableTimeToFullDisplayTracing, .disableSessionTracking, .disableFileIOTracing, .disableUIVCTracing, .disableCoreDataTracing, .disableANRTracking, .disableWatchdogTracking, .disableUITracing, .disablePrewarmedAppStartTracing, .disablePerformanceTracing: return false
case .disableTimeToFullDisplayTracing, .disableSessionTracking, .disableFileIOTracing, .disableUIVCTracing, .disableCoreDataTracing, .disableANRTracking, .disableWatchdogTracking, .disableUITracing, .disablePrewarmedAppStartTracing, .enableStandaloneAppStartTracing, .disablePerformanceTracing: return false
case .sessionTrackingIntervalMillis: return true
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public struct SentrySDKWrapper {
options.enableUserInteractionTracing = !isBenchmarking && !SentrySDKOverrides.Performance.disableUITracing.boolValue

options.enablePreWarmedAppStartTracing = !isBenchmarking && !SentrySDKOverrides.Performance.disablePrewarmedAppStartTracing.boolValue
options.experimental.enableStandaloneAppStartTracing = SentrySDKOverrides.Performance.enableStandaloneAppStartTracing.boolValue
options.enableUIViewControllerTracing = !SentrySDKOverrides.Performance.disableUIVCTracing.boolValue

// -- Screenshot Options --
Expand Down
1 change: 1 addition & 0 deletions Samples/Shared/feature-flags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ schemeTemplates:
"--io.sentry.performance.disable-file-io-tracing": false
"--io.sentry.performance.disable-automatic-session-tracking": false
"--io.sentry.performance.disable-watchdog-tracking": false
"--io.sentry.performance.enable-standalone-app-start-tracing": false
"--io.sentry.tracing.disable-tracing": false
"--io.sentry.performance.disable-core-data-tracing": false
"--io.sentry.performance.disable-uiviewcontroller-tracing": false
Expand Down
44 changes: 44 additions & 0 deletions Sources/Sentry/SentryAppStartMeasurementProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

# import "PrivateSentrySDKOnly.h"
# import "SentryAppStartMeasurement.h"
# import "SentryId.h"
# import "SentryInternalCDefines.h"
# import "SentryInternalDefines.h"
# import "SentryLogC.h"
Expand All @@ -21,6 +22,8 @@

static NSObject *appStartMeasurementLock;
static BOOL appStartMeasurementRead;
static SentryId *_Nullable appStartTraceId;
static NSString *_Nullable appStartScreen;

@implementation SentryAppStartMeasurementProvider

Expand Down Expand Up @@ -94,10 +97,51 @@ + (nullable SentryAppStartMeasurement *)appStartMeasurementForOperation:(NSStrin
return measurement;
}

+ (void)markAsRead
{
@synchronized(appStartMeasurementLock) {
appStartMeasurementRead = YES;
}
}

+ (void)setAppStartTraceId:(nullable SentryId *)traceId
{
@synchronized(appStartMeasurementLock) {
appStartTraceId = traceId;
}
}

+ (nullable SentryId *)appStartTraceId
{
@synchronized(appStartMeasurementLock) {
return appStartTraceId;
}
}

+ (void)setAppStartScreen:(nullable NSString *)screenName
{
@synchronized(appStartMeasurementLock) {
if (appStartScreen == nil) {
appStartScreen = [screenName copy];
}
}
}

+ (nullable NSString *)consumeAppStartScreen
{
@synchronized(appStartMeasurementLock) {
NSString *name = appStartScreen;
appStartScreen = nil;
return name;
}
}

+ (void)reset
{
@synchronized(appStartMeasurementLock) {
appStartMeasurementRead = NO;
appStartTraceId = nil;
appStartScreen = nil;
}
}

Expand Down
114 changes: 88 additions & 26 deletions Sources/Sentry/SentryBuildAppStartSpans.m
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
#import "SentryAppStartMeasurement.h"
#import "SentryLogC.h"
#import "SentrySpanContext+Private.h"
#import "SentrySpanDataKey.h"
#import "SentrySpanId.h"
#import "SentrySpanInternal.h"
#import "SentrySpanOperation.h"
#import "SentrySwift.h"
#import "SentryTraceOrigin.h"
#import "SentryTracer.h"
#import <SentryBuildAppStartSpans.h>

#if SENTRY_HAS_UIKIT

id<SentrySpan>
# pragma mark - Private

static id<SentrySpan>
sentryBuildAppStartSpan(
SentryTracer *tracer, SentrySpanId *parentId, NSString *operation, NSString *description)
{
Expand All @@ -22,78 +27,135 @@
origin:SentryTraceOriginAutoAppStart
sampled:tracer.sampled];

// Pass nil for the framesTracker because app start spans are created during launch,
// before the frames tracker is available.
return [[SentrySpanInternal alloc] initWithTracer:tracer context:context framesTracker:nil];
}

NSArray<id<SentrySpan>> *
sentryBuildAppStartSpans(
SentryTracer *tracer, SentryAppStartMeasurement *_Nullable appStartMeasurement)
/**
* Internal helper that builds the app start child spans. When @c isStandalone is @c YES the
* intermediate grouping span is omitted and children are parented directly to the tracer.
*/
static NSArray<id<SentrySpan>> *
sentryBuildAppStartSpansInternal(SentryTracer *tracer,
SentryAppStartMeasurement *_Nullable appStartMeasurement, BOOL isStandalone)
{

if (appStartMeasurement == nil) {
return @[];
}

NSString *operation;
NSString *type;

switch (appStartMeasurement.type) {
case SentryAppStartTypeCold:
operation = @"app.start.cold";
type = @"Cold Start";
break;
case SentryAppStartTypeWarm:
operation = @"app.start.warm";
type = @"Warm Start";
break;
default:
return @[];
if (isStandalone) {
operation = SentrySpanOperationAppStart;
type = @"App Start";
Comment thread
cursor[bot] marked this conversation as resolved.
} else {
switch (appStartMeasurement.type) {
case SentryAppStartTypeCold:
operation = SentrySpanOperationAppStartCold;
type = @"Cold Start";
break;
case SentryAppStartTypeWarm:
operation = SentrySpanOperationAppStartWarm;
type = @"Warm Start";
break;
default:
SENTRY_LOG_ERROR(@"Unknown app start type, can't build app start spans");
return @[];
}
}

NSString *startType = nil;
if (appStartMeasurement.type == SentryAppStartTypeCold
|| appStartMeasurement.type == SentryAppStartTypeWarm) {
NSString *base = appStartMeasurement.type == SentryAppStartTypeCold ? @"cold" : @"warm";
startType = appStartMeasurement.isPreWarmed
? [NSString stringWithFormat:@"%@.prewarmed", base]
: base;
}

NSMutableArray<id<SentrySpan>> *appStartSpans = [NSMutableArray array];

NSDate *appStartEndTimestamp = [appStartMeasurement.appStartTimestamp
dateByAddingTimeInterval:appStartMeasurement.duration];

id<SentrySpan> appStartSpan = sentryBuildAppStartSpan(tracer, tracer.spanId, operation, type);
[appStartSpan setStartTimestamp:appStartMeasurement.appStartTimestamp];
[appStartSpan setTimestamp:appStartEndTimestamp];

[appStartSpans addObject:appStartSpan];
SentrySpanId *appStartSpanParentId;
if (isStandalone) {
appStartSpanParentId = tracer.spanId;
} else {
id<SentrySpan> appStartSpan
= sentryBuildAppStartSpan(tracer, tracer.spanId, operation, type);
[appStartSpan setStartTimestamp:appStartMeasurement.appStartTimestamp];
[appStartSpan setTimestamp:appStartEndTimestamp];
[appStartSpans addObject:appStartSpan];
appStartSpanParentId = appStartSpan.spanId;
}

if (!appStartMeasurement.isPreWarmed) {
id<SentrySpan> premainSpan
= sentryBuildAppStartSpan(tracer, appStartSpan.spanId, operation, @"Pre Runtime Init");
= sentryBuildAppStartSpan(tracer, appStartSpanParentId, operation, @"Pre Runtime Init");
[premainSpan setStartTimestamp:appStartMeasurement.appStartTimestamp];
[premainSpan setTimestamp:appStartMeasurement.runtimeInitTimestamp];
if (isStandalone && startType != nil) {
[premainSpan setDataValue:startType forKey:SentrySpanDataKeyAppVitalsStartType];
}
[appStartSpans addObject:premainSpan];

id<SentrySpan> runtimeInitSpan = sentryBuildAppStartSpan(
tracer, appStartSpan.spanId, operation, @"Runtime Init to Pre Main Initializers");
tracer, appStartSpanParentId, operation, @"Runtime Init to Pre Main Initializers");
[runtimeInitSpan setStartTimestamp:appStartMeasurement.runtimeInitTimestamp];
[runtimeInitSpan setTimestamp:appStartMeasurement.moduleInitializationTimestamp];
if (isStandalone && startType != nil) {
[runtimeInitSpan setDataValue:startType forKey:SentrySpanDataKeyAppVitalsStartType];
}
[appStartSpans addObject:runtimeInitSpan];
}

id<SentrySpan> appInitSpan
= sentryBuildAppStartSpan(tracer, appStartSpan.spanId, operation, @"UIKit Init");
= sentryBuildAppStartSpan(tracer, appStartSpanParentId, operation, @"UIKit Init");
[appInitSpan setStartTimestamp:appStartMeasurement.moduleInitializationTimestamp];
[appInitSpan setTimestamp:appStartMeasurement.sdkStartTimestamp];
if (isStandalone && startType != nil) {
[appInitSpan setDataValue:startType forKey:SentrySpanDataKeyAppVitalsStartType];
}
[appStartSpans addObject:appInitSpan];

id<SentrySpan> didFinishLaunching
= sentryBuildAppStartSpan(tracer, appStartSpan.spanId, operation, @"Application Init");
= sentryBuildAppStartSpan(tracer, appStartSpanParentId, operation, @"Application Init");
[didFinishLaunching setStartTimestamp:appStartMeasurement.sdkStartTimestamp];
[didFinishLaunching setTimestamp:appStartMeasurement.didFinishLaunchingTimestamp];
if (isStandalone && startType != nil) {
[didFinishLaunching setDataValue:startType forKey:SentrySpanDataKeyAppVitalsStartType];
}
[appStartSpans addObject:didFinishLaunching];

id<SentrySpan> frameRenderSpan
= sentryBuildAppStartSpan(tracer, appStartSpan.spanId, operation, @"Initial Frame Render");
= sentryBuildAppStartSpan(tracer, appStartSpanParentId, operation, @"Initial Frame Render");
[frameRenderSpan setStartTimestamp:appStartMeasurement.didFinishLaunchingTimestamp];
[frameRenderSpan setTimestamp:appStartEndTimestamp];
if (isStandalone && startType != nil) {
[frameRenderSpan setDataValue:startType forKey:SentrySpanDataKeyAppVitalsStartType];
}
[appStartSpans addObject:frameRenderSpan];

return appStartSpans;
}

# pragma mark - Public

NSArray<id<SentrySpan>> *
sentryBuildAppStartSpans(
SentryTracer *tracer, SentryAppStartMeasurement *_Nullable appStartMeasurement)
{
return sentryBuildAppStartSpansInternal(tracer, appStartMeasurement, NO);
}

NSArray<id<SentrySpan>> *
sentryBuildStandaloneAppStartSpans(
SentryTracer *tracer, SentryAppStartMeasurement *_Nullable appStartMeasurement)
{
return sentryBuildAppStartSpansInternal(tracer, appStartMeasurement, YES);
}
Comment thread
philipphofmann marked this conversation as resolved.

#endif // SENTRY_HAS_UIKIT
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#if SENTRY_HAS_UIKIT

# import "SentryAppStartMeasurementProvider.h"
# import "SentryHub.h"
# import "SentryLogC.h"
# import "SentryPerformanceTracker.h"
Expand Down Expand Up @@ -183,6 +184,9 @@ - (void)startRootSpanFor:(UIViewController *)controller
}

NSString *name = [SwiftDescriptor getViewControllerClassName:controller];

[SentryAppStartMeasurementProvider setAppStartScreen:name];

spanId = [self.tracker startSpanWithName:name
nameSource:kSentryTransactionNameSourceComponent
operation:SentrySpanOperationUiLoad
Expand Down
25 changes: 20 additions & 5 deletions Sources/Sentry/SentryPerformanceTracker.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#import "SentryPerformanceTracker.h"
#import "SentryAppStartMeasurementProvider.h"
#import "SentryHub+Private.h"
#import "SentryLogC.h"
#import "SentrySDK+Private.h"
Expand Down Expand Up @@ -71,11 +72,25 @@
newSpan = [activeSpan startChildWithOperation:operation description:name];
newSpan.origin = origin;
} else {
SentryTransactionContext *context =
[[SentryTransactionContext alloc] initWithName:name
nameSource:nameSource
operation:operation
origin:origin];
SentryId *appStartTraceId = [SentryAppStartMeasurementProvider appStartTraceId];

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFrameworks

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFrameworks

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFrameworks

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Unit macOS 26 Sentry / Unit macOS 26 Sentry

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Unit macOS 26 Sentry / Unit macOS 26 Sentry

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Unit macOS 26 Sentry / Unit macOS 26 Sentry

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Check AppKit linkage (Release)

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Check AppKit linkage (Release)

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Check AppKit linkage (Release)

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Lint

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Lint

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Lint

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (SentrySwiftUI, mh_dylib, sentry-swiftui) / watchos

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (SentrySwiftUI, mh_dylib, sentry-swiftui) / watchos

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (SentrySwiftUI, mh_dylib, sentry-swiftui) / watchos

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / iphonesimulator

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / iphonesimulator

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / iphonesimulator

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / appletvos

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / appletvos

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / appletvos

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / watchos

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / watchos

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / watchos

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Unit macOS 14 Sentry / Unit macOS 14 Sentry

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Unit macOS 14 Sentry / Unit macOS 14 Sentry

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Unit macOS 14 Sentry / Unit macOS 14 Sentry

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample watchOS-Swift WatchKit App Debug

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample watchOS-Swift WatchKit App Debug

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample watchOS-Swift WatchKit App Debug

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Check no UIKit linkage (DebugWithoutUIKit)

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Check no UIKit linkage (DebugWithoutUIKit)

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Check no UIKit linkage (DebugWithoutUIKit)

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build with SPM

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build with SPM

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build with SPM

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / iphoneos

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / iphoneos

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / iphoneos

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample SPM macOS

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample SPM macOS

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample SPM macOS

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample macOS-Swift Debug

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample macOS-Swift Debug

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample macOS-Swift Debug

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (SentrySwiftUI, mh_dylib, sentry-swiftui) / macosx

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (SentrySwiftUI, mh_dylib, sentry-swiftui) / macosx

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (SentrySwiftUI, mh_dylib, sentry-swiftui) / macosx

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / maccatalyst

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / maccatalyst

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / maccatalyst

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Check no AppKit linkage (ReleaseWithoutUIKit)

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Check no AppKit linkage (ReleaseWithoutUIKit)

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Check no AppKit linkage (ReleaseWithoutUIKit)

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / macosx

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / macosx

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -WithoutUIKitOrAppKit, WithoutUIKit, sentry-withoutui... / macosx

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample macOS-SwiftUI Debug

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample macOS-SwiftUI Debug

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample macOS-SwiftUI Debug

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -Dynamic, sentry-dynamic) / macosx

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -Dynamic, sentry-dynamic) / macosx

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, mh_dylib, -Dynamic, sentry-dynamic) / macosx

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / macOS CLI (NoUIFramework) builds and has no AppKit/UIKit

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / macOS CLI (NoUIFramework) builds and has no AppKit/UIKit

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / macOS CLI (NoUIFramework) builds and has no AppKit/UIKit

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample SPM watchOS

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample SPM watchOS

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Sample SPM watchOS

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, staticlib, sentry-static) / watchos

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, staticlib, sentry-static) / watchos

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Build XCFramework Slices (Sentry, staticlib, sentry-static) / watchos

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Check no UIKit linkage (ReleaseWithoutUIKit)

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Check no UIKit linkage (ReleaseWithoutUIKit)

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Check no UIKit linkage (ReleaseWithoutUIKit)

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Unit macOS 15 Sentry / Unit macOS 15 Sentry

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Unit macOS 15 Sentry / Unit macOS 15 Sentry

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Unit macOS 15 Sentry / Unit macOS 15 Sentry

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Unit with Test Server macOS 15

no known class method for selector 'appStartTraceId'

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Unit with Test Server macOS 15

receiver 'SentryAppStartMeasurement' for class message is a forward declaration

Check failure on line 75 in Sources/Sentry/SentryPerformanceTracker.m

View workflow job for this annotation

GitHub Actions / Unit with Test Server macOS 15

unknown receiver 'SentryAppStartMeasurementProvider'; did you mean 'SentryAppStartMeasurement'?
SentryTransactionContext *context;
if (appStartTraceId != nil) {
context = [[SentryTransactionContext alloc] initWithName:name
Comment thread
itaybre marked this conversation as resolved.
Outdated
nameSource:nameSource
operation:operation
origin:origin
traceId:appStartTraceId
spanId:[[SentrySpanId alloc] init]
parentSpanId:nil
parentSampled:kSentrySampleDecisionUndecided
parentSampleRate:nil
parentSampleRand:nil];
Comment thread
cursor[bot] marked this conversation as resolved.
} else {
context = [[SentryTransactionContext alloc] initWithName:name
nameSource:nameSource
operation:operation
origin:origin];
}

id<SentrySpan> span = SentrySDKInternal.currentHub.scope.span;

Expand Down
5 changes: 5 additions & 0 deletions Sources/Sentry/SentrySpanDataKey.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@

NSString *const SentrySpanDataKeyFileSize = @"file.size";
NSString *const SentrySpanDataKeyFilePath = @"file.path";

NSString *const SentrySpanDataKeyAppVitalsStartType = @"app.vitals.start.type";
NSString *const SentrySpanDataKeyAppVitalsStartValue = @"app.vitals.start.value";
NSString *const SentrySpanDataKeyAppVitalsStartColdValue = @"app.vitals.start.cold.value";
NSString *const SentrySpanDataKeyAppVitalsStartWarmValue = @"app.vitals.start.warm.value";
4 changes: 4 additions & 0 deletions Sources/Sentry/SentrySpanOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

NSString *const SentrySpanOperationUiAction = @"ui.action";
NSString *const SentrySpanOperationUiActionClick = @"ui.action.click";
NSString *const SentrySpanOperationAppStart = @"app.start";
NSString *const SentrySpanOperationAppStartCold = @"app.start.cold";
Copy link
Copy Markdown
Member

@romtsn romtsn Apr 13, 2026

Choose a reason for hiding this comment

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

we've made a decision with @noahsmartin that we want to switch the span operation to just app.start, and make the distinction of the type by introducing these new attributes (as mentioned here):

app.vitals.start.type β€” app start type (cold/warm)
app.vitals.start.value - app start value in ms

this would make it cleaner as well as allow us to sample this specific spans/transactions in a custom TracesSampler callback without introducing a new sample rate.

Copy link
Copy Markdown
Contributor

@buenaflor buenaflor Apr 14, 2026

Choose a reason for hiding this comment

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

side note: for now we will additionally send app.vitals.start.cold/warm.value attributes on top of the app.vitals.start.value and app.vitals.start.type combination (getsentry/sentry-conventions#318).

This is mainly due to migrations because relay needs to manually backfill those attributes and existing transactions dont have them (see PR). So the mobile vitals dashboard will work with app.vitals.start.cold/warm.value for now. After ~90 days (which should be around end of July) we can fully migrate to app.vitals.start.value and app.vitals.start.type.

Depending on when this PR finishes we might not need the support for app.vitals.start.cold/warm.value :)

NSString *const SentrySpanOperationAppStartWarm = @"app.start.warm";

NSString *const SentrySpanOperationUiLoad = @"ui.load";
NSString *const SentrySpanOperationUiLoadInitialDisplay = @"ui.load.initial_display";
NSString *const SentrySpanOperationUiLoadFullDisplay = @"ui.load.full_display";
Loading
Loading