Skip to content

Conversation

@chargome
Copy link
Member

@chargome chargome commented Nov 5, 2025

@chargome chargome self-assigned this Nov 5, 2025
@chargome chargome requested a review from a team as a code owner November 5, 2025 15:13
@linear
Copy link

linear bot commented Nov 5, 2025

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 5, 2025
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Feature flag gap for METRICS product selection

The getDisabledProducts function doesn't include a feature flag check for ProductSolution.METRICS, even though METRICS is now added to the product selection UI and platform availability lists. This is inconsistent with how other products (SESSION_REPLAY, PERFORMANCE_MONITORING, PROFILING, LOGS) are handled, where each has a corresponding feature flag check. Without this check, users could potentially select METRICS even if their organization doesn't have the feature enabled, leading to broken functionality or misleading UI state.

static/app/components/onboarding/productSelection.tsx#L31-L80

const disabledProducts: DisabledProducts = {};
const hasSessionReplay = organization.features.includes('session-replay');
const hasPerformance = organization.features.includes('performance-view');
const hasProfiling = organization.features.includes('profiling-view');
const hasLogs = organization.features.includes('ourlogs-enabled');
const isSelfHostedErrorsOnly = ConfigStore.get('isSelfHostedErrorsOnly');
let reason = t('This feature is not enabled on your Sentry installation.');
const createClickHandler = (feature: string, featureName: string) => () => {
openModal(deps => (
<FeatureDisabledModal {...deps} features={[feature]} featureName={featureName} />
));
};
if (isSelfHostedErrorsOnly) {
reason = t('This feature is disabled for errors only self-hosted');
return Object.values(ProductSolution)
.filter(product => product !== ProductSolution.ERROR_MONITORING)
.reduce<DisabledProducts>((acc, prod) => {
acc[prod] = {reason};
return acc;
}, {});
}
if (!hasSessionReplay) {
disabledProducts[ProductSolution.SESSION_REPLAY] = {
reason,
onClick: createClickHandler('organizations:session-replay', 'Session Replay'),
};
}
if (!hasPerformance) {
disabledProducts[ProductSolution.PERFORMANCE_MONITORING] = {
reason,
onClick: createClickHandler('organizations:performance-view', 'Tracing'),
};
}
if (!hasProfiling) {
disabledProducts[ProductSolution.PROFILING] = {
reason,
onClick: createClickHandler('organizations:profiling-view', 'Profiling'),
};
}
if (!hasLogs) {
disabledProducts[ProductSolution.LOGS] = {
reason,
onClick: createClickHandler('organizations:ourlogs-enabled', 'Logs'),
};
}
return disabledProducts;
}

Fix in Cursor Fix in Web


Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Metrics access bypasses feature flag check

The getDisabledProducts function does not check for a metrics feature flag before allowing users to select the Metrics product. The function checks for feature flags for SESSION_REPLAY (session-replay), PERFORMANCE_MONITORING (performance-view), PROFILING (profiling-view), and LOGS (ourlogs-enabled), but is missing a similar check for METRICS. This means users can select Metrics during onboarding even if their organization doesn't have the metrics feature enabled, which is inconsistent with how other products are handled and could lead to unexpected behavior.

static/app/components/onboarding/productSelection.tsx#L30-L77

function getDisabledProducts(organization: Organization): DisabledProducts {
const disabledProducts: DisabledProducts = {};
const hasSessionReplay = organization.features.includes('session-replay');
const hasPerformance = organization.features.includes('performance-view');
const hasProfiling = organization.features.includes('profiling-view');
const hasLogs = organization.features.includes('ourlogs-enabled');
const isSelfHostedErrorsOnly = ConfigStore.get('isSelfHostedErrorsOnly');
let reason = t('This feature is not enabled on your Sentry installation.');
const createClickHandler = (feature: string, featureName: string) => () => {
openModal(deps => (
<FeatureDisabledModal {...deps} features={[feature]} featureName={featureName} />
));
};
if (isSelfHostedErrorsOnly) {
reason = t('This feature is disabled for errors only self-hosted');
return Object.values(ProductSolution)
.filter(product => product !== ProductSolution.ERROR_MONITORING)
.reduce<DisabledProducts>((acc, prod) => {
acc[prod] = {reason};
return acc;
}, {});
}
if (!hasSessionReplay) {
disabledProducts[ProductSolution.SESSION_REPLAY] = {
reason,
onClick: createClickHandler('organizations:session-replay', 'Session Replay'),
};
}
if (!hasPerformance) {
disabledProducts[ProductSolution.PERFORMANCE_MONITORING] = {
reason,
onClick: createClickHandler('organizations:performance-view', 'Tracing'),
};
}
if (!hasProfiling) {
disabledProducts[ProductSolution.PROFILING] = {
reason,
onClick: createClickHandler('organizations:profiling-view', 'Profiling'),
};
}
if (!hasLogs) {
disabledProducts[ProductSolution.LOGS] = {
reason,
onClick: createClickHandler('organizations:ourlogs-enabled', 'Logs'),
};

Fix in Cursor Fix in Web


@chargome chargome force-pushed the cg-metrics-onboarding-js branch from 7eef636 to 532707e Compare November 6, 2025 18:58
@codecov
Copy link

codecov bot commented Nov 6, 2025

❌ 6 Tests Failed:

Tests completed Failed Passed Skipped
12466 6 12460 10
View the top 3 failed test(s) by shortest run time
javascript-solidstart onboarding docs enables logs by setting enableLogs to true
Stack Traces | 0.111s run time
TestingLibraryElementError: Unable to find an element with the text: function (_, element) { return findTextWithMarkup(element, textMatch); } (normalized from 'function (_, element) {
    return findTextWithMarkup(element, textMatch);
  }'). This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
...
    at Object.getElementError (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/config.js:37:19)
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:76:38
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:109:15
    at Object.getAllByText (.../javascript/solidstart/onboarding.spec.tsx:117:19)
    at Promise.finally.completed (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1559:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1499:10)
    at _callCircusTest (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1009:40)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at _runTest (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:949:3)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:839:13)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:829:11)
    at run (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:757:3)
    at runAndTransformResultsToJestFormat (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1920:21)
    at jestAdapter (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/runner.js:101:19)
    at runTestInternal (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:272:16)
    at runTest (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:340:7)
    at Object.worker (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:494:12)
javascript-solidstart onboarding docs includes browserTracingIntegration when performance is selected
Stack Traces | 0.129s run time
TestingLibraryElementError: Unable to find an element with the text: function (_, element) { return findTextWithMarkup(element, textMatch); } (normalized from 'function (_, element) {
    return findTextWithMarkup(element, textMatch);
  }'). This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
...
    at Object.getElementError (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/config.js:37:19)
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:76:38
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:52:17
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:95:19
    at Object.getByText (.../javascript/solidstart/onboarding.spec.tsx:60:14)
    at Promise.finally.completed (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1559:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1499:10)
    at _callCircusTest (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1009:40)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at _runTest (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:949:3)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:839:13)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:829:11)
    at run (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:757:3)
    at runAndTransformResultsToJestFormat (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1920:21)
    at jestAdapter (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/runner.js:101:19)
    at runTestInternal (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:272:16)
    at runTest (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:340:7)
    at Object.worker (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:494:12)
javascript-tanstackstart-react onboarding docs displays verify instructions
Stack Traces | 0.187s run time
TestingLibraryElementError: Unable to find an element with the text: function (_, element) { return findTextWithMarkup(element, textMatch); } (normalized from 'function (_, element) {
    return findTextWithMarkup(element, textMatch);
  }'). This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
...
    at Object.getElementError (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/config.js:37:19)
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:76:38
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:52:17
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:95:19
    at Object.getByText (.../javascript/tanstackstart-react/onboarding.spec.tsx:75:19)
    at Promise.finally.completed (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1559:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1499:10)
    at _callCircusTest (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1009:40)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at _runTest (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:949:3)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:839:13)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:829:11)
    at run (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:757:3)
    at runAndTransformResultsToJestFormat (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1920:21)
    at jestAdapter (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/runner.js:101:19)
    at runTestInternal (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:272:16)
    at runTest (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:340:7)
    at Object.worker (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:494:12)
javascript-tanstackstart-react onboarding docs renders onboarding docs correctly
Stack Traces | 0.188s run time
TestingLibraryElementError: Found multiple elements with the text: function (_, element) {
    return findTextWithMarkup(element, textMatch);
  }

Here are the matching elements:

Ignored nodes: comments, script, style
...

Ignored nodes: comments, script, style
...

Ignored nodes: comments, script, style
...

Ignored nodes: comments, script, style
...

(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).

Ignored nodes: comments, script, style
...
    at Object.getElementError (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/config.js:37:19)
    at getElementError (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:20:35)
    at getMultipleElementsFoundError (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:23:10)
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:55:13
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:95:19
    at Object.getByText (.../javascript/tanstackstart-react/onboarding.spec.tsx:18:14)
    at Promise.finally.completed (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1559:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1499:10)
    at _callCircusTest (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1009:40)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at _runTest (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:949:3)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:839:13)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:829:11)
    at run (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:757:3)
    at runAndTransformResultsToJestFormat (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1920:21)
    at jestAdapter (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/runner.js:101:19)
    at runTestInternal (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:272:16)
    at runTest (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:340:7)
    at Object.worker (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:494:12)
javascript-solidstart onboarding docs renders onboarding docs correctly
Stack Traces | 0.196s run time
TestingLibraryElementError: Found multiple elements with the text: function (_, element) {
    return findTextWithMarkup(element, textMatch);
  }

Here are the matching elements:

Ignored nodes: comments, script, style
...

Ignored nodes: comments, script, style
...

(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).

Ignored nodes: comments, script, style
...
    at Object.getElementError (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/config.js:37:19)
    at getElementError (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:20:35)
    at getMultipleElementsFoundError (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:23:10)
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:55:13
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:95:19
    at Object.getByText (.../javascript/solidstart/onboarding.spec.tsx:18:14)
    at Promise.finally.completed (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1559:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1499:10)
    at _callCircusTest (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1009:40)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at _runTest (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:949:3)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:839:13)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:829:11)
    at run (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:757:3)
    at runAndTransformResultsToJestFormat (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1920:21)
    at jestAdapter (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/runner.js:101:19)
    at runTestInternal (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:272:16)
    at runTest (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:340:7)
    at Object.worker (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:494:12)
javascript-tanstackstart-react onboarding docs displays sample rates when performance and replay are selected
Stack Traces | 0.203s run time
TestingLibraryElementError: Found multiple elements with the text: function (_, element) {
    return findTextWithMarkup(element, textMatch);
  }

Here are the matching elements:

Ignored nodes: comments, script, style
...

Ignored nodes: comments, script, style
...

(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).

Ignored nodes: comments, script, style
...
    at Object.getElementError (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/config.js:37:19)
    at getElementError (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:20:35)
    at getMultipleElementsFoundError (.../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:23:10)
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:55:13
    at .../sentry/node_modules/.pnpm/@[email protected]/node_modules/@.../dom/dist/query-helpers.js:95:19
    at Object.getByText (.../javascript/tanstackstart-react/onboarding.spec.tsx:34:14)
    at Promise.finally.completed (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1559:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1499:10)
    at _callCircusTest (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1009:40)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at _runTest (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:949:3)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:839:13)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:829:11)
    at run (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:757:3)
    at runAndTransformResultsToJestFormat (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/jestAdapterInit.js:1920:21)
    at jestAdapter (.../sentry/node_modules/.pnpm/[email protected][email protected]..../jest-circus/build/runner.js:101:19)
    at runTestInternal (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:272:16)
    at runTest (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:340:7)
    at Object.worker (.../sentry/node_modules/.pnpm/[email protected]..../jest-runner/build/testWorker.js:494:12)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

# Conflicts:
#	static/app/gettingStartedDocs/javascript/gatsby.tsx
#	static/app/gettingStartedDocs/javascript/react.tsx
#	static/app/gettingStartedDocs/javascript/svelte.tsx
#	static/app/gettingStartedDocs/javascript/tanstackstart-react.tsx
#	static/app/gettingStartedDocs/javascript/vue.tsx
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Metrics available despite missing feature.

The getDisabledProducts function doesn't check for the custom-metrics feature flag, even though ProductSolution.METRICS is now available for selection on multiple platforms. Users without the metrics feature enabled can still select it during onboarding, leading to broken functionality. The function should check organization.features.includes('custom-metrics') and add ProductSolution.METRICS to disabled products when not available.

static/app/components/onboarding/productSelection.tsx#L29-L80

function getDisabledProducts(organization: Organization): DisabledProducts {
const disabledProducts: DisabledProducts = {};
const hasSessionReplay = organization.features.includes('session-replay');
const hasPerformance = organization.features.includes('performance-view');
const hasProfiling = organization.features.includes('profiling-view');
const hasLogs = organization.features.includes('ourlogs-enabled');
const isSelfHostedErrorsOnly = ConfigStore.get('isSelfHostedErrorsOnly');
let reason = t('This feature is not enabled on your Sentry installation.');
const createClickHandler = (feature: string, featureName: string) => () => {
openModal(deps => (
<FeatureDisabledModal {...deps} features={[feature]} featureName={featureName} />
));
};
if (isSelfHostedErrorsOnly) {
reason = t('This feature is disabled for errors only self-hosted');
return Object.values(ProductSolution)
.filter(product => product !== ProductSolution.ERROR_MONITORING)
.reduce<DisabledProducts>((acc, prod) => {
acc[prod] = {reason};
return acc;
}, {});
}
if (!hasSessionReplay) {
disabledProducts[ProductSolution.SESSION_REPLAY] = {
reason,
onClick: createClickHandler('organizations:session-replay', 'Session Replay'),
};
}
if (!hasPerformance) {
disabledProducts[ProductSolution.PERFORMANCE_MONITORING] = {
reason,
onClick: createClickHandler('organizations:performance-view', 'Tracing'),
};
}
if (!hasProfiling) {
disabledProducts[ProductSolution.PROFILING] = {
reason,
onClick: createClickHandler('organizations:profiling-view', 'Profiling'),
};
}
if (!hasLogs) {
disabledProducts[ProductSolution.LOGS] = {
reason,
onClick: createClickHandler('organizations:ourlogs-enabled', 'Logs'),
};
}
return disabledProducts;
}

Fix in Cursor Fix in Web


@priscilawebdev
Copy link
Member

hey @chargome , sorry for the many conflicts I caused. I have 2x more JS split PRs to go and as soon as I merge them, I promise to solve all the conflicts 😉

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Enable Logs for Server Setup

The getSdkServerSetupSnippet function is missing enableLogs configuration when params.isLogsSelected is true. Other full-stack frameworks like Astro include this configuration in their server setup. The function should add enableLogs: true conditionally based on params.isLogsSelected, similar to how it handles performance and profiling configurations.

static/app/gettingStartedDocs/javascript/solidstart/onboarding.tsx#L12-L44

function getSdkServerSetupSnippet(params: DocsParams) {
return `
import * as Sentry from "@sentry/solidstart";
Sentry.init({
dsn: "${params.dsn.public}",
${
params.isPerformanceSelected
? `
// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\\/\\/yourserver\\.io\\/api/],`
: ''
}${
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,`
: ''
}
// Setting this option to true will send default PII data to Sentry.
// For example, automatic IP address collection on events
sendDefaultPii: true,
});
`;
}

Fix in Cursor Fix in Web


Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Incomplete Remix Onboarding Experience

The nextSteps function was removed but not replaced, leaving the Remix onboarding configuration without any next steps. This breaks consistency with other similar full-stack frameworks and prevents users from seeing the Metrics documentation link when metrics are selected during onboarding.

static/app/gettingStartedDocs/javascript/remix/onboarding.tsx#L88-L90

Fix in Cursor Fix in Web


Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Inconsistent Remix Onboarding Next Steps

The nextSteps property was removed from the remix onboarding config. According to the OnboardingConfig type definition, nextSteps is optional but when present should be a generator function that returns an array of next steps based on DocsParams. Other similar files in the PR (like nextjs, nuxt, sveltekit) still have nextSteps that returns an empty array when no conditional steps apply. This inconsistency may cause issues if the onboarding renderer expects this property to exist, and it prevents adding metrics-related next steps like other platforms support.

static/app/gettingStartedDocs/javascript/remix/onboarding.tsx#L89-L90

Fix in Cursor Fix in Web


Bug: Nuxt: Inconsistent metrics documentation onboarding.

The nextSteps function doesn't accept params and conditionally add metrics documentation when metrics are selected. Other meta-frameworks in this PR (like astro, solidstart, react, etc.) that receive metricsOnboarding support also update their nextSteps to conditionally include metrics documentation based on params.isMetricsSelected. Nuxt receives metricsOnboarding in its index file but the onboarding config doesn't follow this pattern, creating inconsistency.

static/app/gettingStartedDocs/javascript/nuxt/onboarding.tsx#L87-L95

https://github.com/getsentry/sentry/blob/66f1569ef7c08fe3d8658cfaae39810aa067523b/static/app/gettingStartedDocs/javascript/nuxt/onboarding.tsx#L87-L95

Fix in Cursor Fix in Web


Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Misleading verification text for metrics.

The verify text only mentions "test log" when isLogsSelected is true, but doesn't account for when isMetricsSelected is true without logs. When metrics are selected (but not logs), the text should mention "test metric" as well, but currently it will only say "trigger a test error" even though the code snippet includes Sentry.metrics.count(). The condition should check both params.isLogsSelected and params.isMetricsSelected to provide accurate user guidance.

static/app/gettingStartedDocs/javascript/angular/onboarding.tsx#L170-L179

...params,
}),
],
verify: (params: Params) => [
{
type: StepType.VERIFY,
content: [
{
type: 'text',
text: params.isLogsSelected

Fix in Cursor Fix in Web


'node-cloudflare-pages': [
ProductSolution.PERFORMANCE_MONITORING,
ProductSolution.LOGS,
ProductSolution.METRICS,

This comment was marked as off-topic.

cursor[bot]

This comment was marked as off-topic.

@chargome chargome merged commit 6e15f40 into master Nov 11, 2025
47 checks passed
@chargome chargome deleted the cg-metrics-onboarding-js branch November 11, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants