|
@@ -16,6 +16,7 @@ import {
|
|
|
getFeedbackConfigureDescription,
|
|
|
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
|
|
|
import {getJSMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
|
|
|
+import {getProfilingDocumentHeaderConfigurationStep} from 'sentry/components/onboarding/gettingStartedDoc/utils/profilingOnboarding';
|
|
|
import {
|
|
|
getReplayConfigOptions,
|
|
|
getReplayConfigureDescription,
|
|
@@ -46,6 +47,10 @@ const getNextStep = (
|
|
|
step => step.id !== ProductSolution.SESSION_REPLAY
|
|
|
);
|
|
|
}
|
|
|
+
|
|
|
+ if (params.isProfilingSelected) {
|
|
|
+ nextStepDocs = nextStepDocs.filter(step => step.id !== ProductSolution.PROFILING);
|
|
|
+ }
|
|
|
return nextStepDocs;
|
|
|
};
|
|
|
|
|
@@ -133,6 +138,9 @@ const onboarding: OnboardingConfig = {
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+ ...(params.isProfilingSelected
|
|
|
+ ? [getProfilingDocumentHeaderConfigurationStep()]
|
|
|
+ : []),
|
|
|
getUploadSourceMapsStep({
|
|
|
guideLink: 'https://docs.sentry.io/platforms/javascript/guides/angular/sourcemaps/',
|
|
|
...params,
|
|
@@ -187,6 +195,7 @@ function getSdkSetupSnippet(params: Params) {
|
|
|
import * as Sentry from "@sentry/angular";
|
|
|
|
|
|
import { AppModule } from "./app/app.module";
|
|
|
+import { getProfilingDocumentHeaderConfigurationStep } from '../../components/onboarding/gettingStartedDoc/utils/profilingOnboarding';
|
|
|
|
|
|
Sentry.init({
|
|
|
dsn: "${params.dsn}",
|
|
@@ -232,12 +241,8 @@ ${getFeedbackConfigOptions(params.feedbackOptions)}}),`
|
|
|
}${
|
|
|
params.isProfilingSelected
|
|
|
? `
|
|
|
- // Set profilesSampleRate to 1.0 to profile every transaction.
|
|
|
- // Since profilesSampleRate is relative to tracesSampleRate,
|
|
|
- // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate
|
|
|
- // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would
|
|
|
- // results in 25% of transactions being profiled (0.5*0.5=0.25)
|
|
|
- profilesSampleRate: 1.0,`
|
|
|
+ // Profiling
|
|
|
+ profilesSampleRate: 1.0, // Profile 100% of the transactions. This value is relative to tracesSampleRate`
|
|
|
: ''
|
|
|
}
|
|
|
});`;
|