Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(launch profiling): set a new trace origin for app launch profiles #3636

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 4 additions & 1 deletion Sources/Sentry/Profiling/SentryLaunchProfiling.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
# import "SentrySamplerDecision.h"
# import "SentrySampling.h"
# import "SentrySamplingContext.h"
# import "SentryTraceOrigins.h"
# import "SentryTracer+Private.h"
# import "SentryTracerConfiguration.h"
# import "SentryTransactionContext.h"
# import "SentryTransactionContext+Private.h"

BOOL isTracingAppLaunch;
NSString *const kSentryLaunchProfileConfigKeyTracesSampleRate = @"traces";
Expand Down Expand Up @@ -130,7 +131,9 @@

SentryTransactionContext *context =
[[SentryTransactionContext alloc] initWithName:@"launch"
nameSource:kSentryTransactionNameSourceCustom

Check warning on line 134 in Sources/Sentry/Profiling/SentryLaunchProfiling.m

View check run for this annotation

Codecov / codecov/patch

Sources/Sentry/Profiling/SentryLaunchProfiling.m#L134

Added line #L134 was not covered by tests
operation:@"app.lifecycle"
origin:SentryTraceOriginAutoAppStartProfile

Check warning on line 136 in Sources/Sentry/Profiling/SentryLaunchProfiling.m

View check run for this annotation

Codecov / codecov/patch

Sources/Sentry/Profiling/SentryLaunchProfiling.m#L136

Added line #L136 was not covered by tests
armcknight marked this conversation as resolved.
Show resolved Hide resolved
sampled:kSentrySampleDecisionYes];
SentryTracerConfiguration *config = [SentryTracerConfiguration defaultConfiguration];
NSDictionary<NSString *, NSNumber *> *rates = appLaunchProfileConfiguration();
Expand Down
1 change: 1 addition & 0 deletions Sources/Sentry/include/SentryTraceOrigins.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ static NSString *const SentryTraceOriginManual = @"manual";
static NSString *const SentryTraceOriginUIEventTracker = @"auto.ui.event_tracker";

static NSString *const SentryTraceOriginAutoAppStart = @"auto.app.start";
static NSString *const SentryTraceOriginAutoAppStartProfile = @"auto.app.start.profile";
static NSString *const SentryTraceOriginAutoNSData = @"auto.file.ns_data";
static NSString *const SentryTraceOriginAutoDBCoreData = @"auto.db.core_data";
static NSString *const SentryTraceOriginAutoHttpNSURLSession = @"auto.http.ns_url_session";
Expand Down
Loading