Problem Statement
Users can set a global sample rate, or use a custom sampler, but there isn't a clear way to set a sample rate for app launches. Many apps will have hundreds of spans throughout the lifetime of a process but only one app launch. A reasonable global sample rate might greatly reduce the number of app launch spans that get sent to Sentry even though they are arguably the most important spans. We should provide an easy way to customize the sample rate just for app launch spans.
Solution
The standalone app start transaction will have the op app.start which you can use to set a different sample rate:
options.tracesSampler = { context in
if context.transactionContext.operation == "app.start" {
return 1.0
}
return nil
}
Problem Statement
Users can set a global sample rate, or use a custom sampler, but there isn't a clear way to set a sample rate for app launches. Many apps will have hundreds of spans throughout the lifetime of a process but only one app launch. A reasonable global sample rate might greatly reduce the number of app launch spans that get sent to Sentry even though they are arguably the most important spans. We should provide an easy way to customize the sample rate just for app launch spans.
Solution
The standalone app start transaction will have the op
app.startwhich you can use to set a different sample rate: