-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
feat(SR): Add SR to Mobile project onboarding features #87304
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,8 +76,16 @@ function getDisabledProducts(organization: Organization): DisabledProducts { | |
// Since the ProductSelection component is rendered in the onboarding/project creation flow only, it is ok to have this list here | ||
// NOTE: Please keep the prefix in alphabetical order | ||
export const platformProductAvailability = { | ||
android: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING], | ||
'apple-ios': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING], | ||
android: [ | ||
ProductSolution.PERFORMANCE_MONITORING, | ||
ProductSolution.PROFILING, | ||
ProductSolution.SESSION_REPLAY, | ||
], | ||
'apple-ios': [ | ||
ProductSolution.PERFORMANCE_MONITORING, | ||
ProductSolution.PROFILING, | ||
ProductSolution.SESSION_REPLAY, | ||
], | ||
'apple-macos': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING], | ||
bun: [ProductSolution.PERFORMANCE_MONITORING], | ||
capacitor: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.SESSION_REPLAY], | ||
|
@@ -187,7 +195,11 @@ export const platformProductAvailability = { | |
'python-tornado': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING], | ||
'python-starlette': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING], | ||
'python-wsgi': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING], | ||
'react-native': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING], | ||
'react-native': [ | ||
ProductSolution.PERFORMANCE_MONITORING, | ||
ProductSolution.PROFILING, | ||
ProductSolution.SESSION_REPLAY, | ||
], | ||
ruby: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING], | ||
'ruby-rack': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING], | ||
'ruby-rails': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.PROFILING], | ||
|
@@ -391,18 +403,6 @@ export function ProductSelection({ | |
checked={urlProducts.includes(ProductSolution.PERFORMANCE_MONITORING)} | ||
/> | ||
)} | ||
{products.includes(ProductSolution.SESSION_REPLAY) && ( | ||
<Product | ||
label={t('Session Replay')} | ||
description={t( | ||
'Video-like reproductions of user sessions with debugging context to help you confirm issue impact and troubleshoot faster.' | ||
)} | ||
docLink="https://docs.sentry.io/platforms/javascript/guides/react/session-replay/" | ||
onClick={() => handleClickProduct(ProductSolution.SESSION_REPLAY)} | ||
disabled={disabledProducts[ProductSolution.SESSION_REPLAY]} | ||
checked={urlProducts.includes(ProductSolution.SESSION_REPLAY)} | ||
/> | ||
)} | ||
{products.includes(ProductSolution.PROFILING) && ( | ||
<Product | ||
label={t('Profiling')} | ||
|
@@ -418,6 +418,18 @@ export function ProductSelection({ | |
checked={urlProducts.includes(ProductSolution.PROFILING)} | ||
/> | ||
)} | ||
{products.includes(ProductSolution.SESSION_REPLAY) && ( | ||
<Product | ||
label={t('Session Replay')} | ||
description={t( | ||
'Video-like reproductions of user sessions with debugging context to help you confirm issue impact and troubleshoot faster.' | ||
)} | ||
docLink="https://docs.sentry.io/platforms/javascript/guides/react/session-replay/" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i know the other links are also platform-specific too, but curious why these links are platform-specific and not linking to the general product docs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good point - IMO makes sense to link to product docs for all of these (in a separate PR?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. works for me! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. split it out to #87412 |
||
onClick={() => handleClickProduct(ProductSolution.SESSION_REPLAY)} | ||
disabled={disabledProducts[ProductSolution.SESSION_REPLAY]} | ||
checked={urlProducts.includes(ProductSolution.SESSION_REPLAY)} | ||
/> | ||
)} | ||
</Products> | ||
); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,16 @@ func application(_ application: UIApplication, | |
// We recommend adjusting this value in production. | ||
options.profilesSampleRate = 1.0` | ||
: '' | ||
}${ | ||
params.isReplaySelected | ||
? ` | ||
|
||
// Record Session Replays for 100% of Errors and 10% of Sessions | ||
options.sessionReplay.onErrorSampleRate = 1.0 | ||
options.sessionReplay.sessionSampleRate = 0.1 | ||
// We recommend the ~5x more performant experimental view renderer | ||
options.sessionReplay.enableExperimentalViewRenderer = true` | ||
: '' | ||
} | ||
}${ | ||
params.isProfilingSelected && | ||
|
@@ -135,6 +145,16 @@ struct SwiftUIApp: App { | |
// We recommend adjusting this value in production. | ||
options.profilesSampleRate = 1.0` | ||
: '' | ||
}${ | ||
params.isReplaySelected | ||
? ` | ||
|
||
// Record Session Replays for 100% of Errors and 10% of Sessions | ||
options.sessionReplay.onErrorSampleRate = 1.0 | ||
options.sessionReplay.sessionSampleRate = 0.1 | ||
// We recommend the ~5x more performant experimental view renderer | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need to decide if we want to point this out here. IMO we should, or we postpone this PR for iOS (and RN, see below) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make sense to me as well. |
||
options.sessionReplay.enableExperimentalViewRenderer = true` | ||
: '' | ||
} | ||
}${ | ||
params.isProfilingSelected && | ||
|
kahest marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,14 @@ Sentry.init({ | |
// Here, we'll capture profiles for 100% of transactions. | ||
profilesSampleRate: 1.0,` | ||
: '' | ||
}${ | ||
params.isReplaySelected | ||
? ` | ||
// Record Session Replays for 10% of Sessions and 100% of Errors | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. RN will have the |
||
replaysSessionSampleRate: 0.1, | ||
replaysOnErrorSampleRate: 1.0, | ||
integrations: [Sentry.mobileReplayIntegration()],` | ||
: '' | ||
} | ||
});`; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this changes the order of the product selection buttons (see PR description why)
we might want to reconsider this, not a strong opinion of mine :)