diff --git a/static/app/components/events/interfaces/spans/spanProfileDetails.tsx b/static/app/components/events/interfaces/spans/spanProfileDetails.tsx
index 96b1ddf158d0c0..9e4bb6b6305064 100644
--- a/static/app/components/events/interfaces/spans/spanProfileDetails.tsx
+++ b/static/app/components/events/interfaces/spans/spanProfileDetails.tsx
@@ -7,6 +7,11 @@ import {SectionHeading} from 'sentry/components/charts/styles';
import {StackTraceContent} from 'sentry/components/events/interfaces/crashContent/stackTrace';
import {StackTraceContentPanel} from 'sentry/components/events/interfaces/crashContent/stackTrace/content';
import {QuestionTooltip} from 'sentry/components/questionTooltip';
+import {FrameContent} from 'sentry/components/stackTrace/frame/frameContent';
+import {IssueFrameActions} from 'sentry/components/stackTrace/issueStackTrace/issueFrameActions';
+import {StackTraceViewStateProvider} from 'sentry/components/stackTrace/stackTraceContext';
+import {StackTraceFrames} from 'sentry/components/stackTrace/stackTraceFrames';
+import {StackTraceProvider} from 'sentry/components/stackTrace/stackTraceProvider';
import {IconChevron, IconProfiling} from 'sentry/icons';
import {t, tct} from 'sentry/locale';
import {EntryType, type EventTransaction, type Frame} from 'sentry/types/event';
@@ -298,20 +303,41 @@ export function SpanProfileDetails({
-
+ {organization.features.includes('issue-details-new-stack-trace') ? (
+
+
+
+
+
+ ) : (
+
+ )}
);
}
diff --git a/static/app/components/stackTrace/getRows.spec.tsx b/static/app/components/stackTrace/getRows.spec.tsx
index 48efd0f1b502fa..6b624ba1412d73 100644
--- a/static/app/components/stackTrace/getRows.spec.tsx
+++ b/static/app/components/stackTrace/getRows.spec.tsx
@@ -78,7 +78,6 @@ describe('stackTrace rows utils', () => {
frameCountMap,
newestFirst: false,
framesOmitted: null,
- maxDepth: undefined,
});
expect(rows).toHaveLength(4);
@@ -108,7 +107,6 @@ describe('stackTrace rows utils', () => {
frameCountMap: getFrameCountMap(frames, true),
newestFirst: false,
framesOmitted: null,
- maxDepth: undefined,
});
expect(rows).toHaveLength(2);
@@ -130,7 +128,6 @@ describe('stackTrace rows utils', () => {
frameCountMap: getFrameCountMap(frames, true),
newestFirst: false,
framesOmitted: [1, 3],
- maxDepth: undefined,
});
expect(rowsWithOmitted.some(row => row.kind === 'omitted')).toBe(true);
diff --git a/static/app/components/stackTrace/getRows.tsx b/static/app/components/stackTrace/getRows.tsx
index f6a2ce5b9e4f06..b5c701cd8a8528 100644
--- a/static/app/components/stackTrace/getRows.tsx
+++ b/static/app/components/stackTrace/getRows.tsx
@@ -116,8 +116,8 @@ export function getRows({
framesOmitted: [number, number] | null | undefined;
hiddenFrameToggleMap: Record;
includeSystemFrames: boolean;
- maxDepth: number | undefined;
newestFirst: boolean;
+ maxDepth?: number;
}): Row[] {
const hiddenFrameIndices = getHiddenFrameIndices({
frames,
diff --git a/static/app/components/stackTrace/stackTrace.spec.tsx b/static/app/components/stackTrace/stackTrace.spec.tsx
index fb9270a0677c24..62df2e5f9e082a 100644
--- a/static/app/components/stackTrace/stackTrace.spec.tsx
+++ b/static/app/components/stackTrace/stackTrace.spec.tsx
@@ -812,6 +812,46 @@ describe('Core StackTrace', () => {
expect(screen.getByText('abc123')).toBeInTheDocument();
});
+ it('shows in-app frames with maxDepth even when system frames outnumber them', async () => {
+ const {event, stacktrace} = makeStackTraceData();
+ const frame = stacktrace.frames[stacktrace.frames.length - 1]!;
+
+ // 2 in-app frames followed by 10 system frames — the in-app frames are
+ // near the start, so a naive maxDepth slice on all frames would miss them.
+ const appFrames = Array.from({length: 2}, (_, i) => ({
+ ...frame,
+ inApp: true,
+ function: `app_fn_${i}`,
+ lineNo: i + 1,
+ instructionAddr: `0xA${i}`,
+ }));
+ const systemFrames = Array.from({length: 10}, (_, i) => ({
+ ...frame,
+ inApp: false,
+ function: `system_fn_${i}`,
+ lineNo: i + 100,
+ instructionAddr: `0xS${i}`,
+ }));
+
+ render(
+
+
+
+ );
+
+ const rows = await screen.findAllByTestId('core-stacktrace-frame-row');
+ expect(rows.length).toBeGreaterThanOrEqual(2);
+ expect(screen.getByText('app_fn_0')).toBeInTheDocument();
+ expect(screen.getByText('app_fn_1')).toBeInTheDocument();
+ });
+
it('renders empty source notation for single frame with no details', async () => {
const {event, stacktrace} = makeStackTraceData();
const frame = stacktrace.frames[stacktrace.frames.length - 1]!;
diff --git a/static/app/components/stackTrace/stackTraceProvider.tsx b/static/app/components/stackTrace/stackTraceProvider.tsx
index 3fd3775a5d882f..256c8d1d8038c1 100644
--- a/static/app/components/stackTrace/stackTraceProvider.tsx
+++ b/static/app/components/stackTrace/stackTraceProvider.tsx
@@ -66,9 +66,8 @@ export function StackTraceProvider({
frameCountMap: {},
newestFirst: isNewestFirst,
framesOmitted: activeStacktrace.framesOmitted,
- maxDepth,
}),
- [frames, isNewestFirst, activeStacktrace.framesOmitted, maxDepth]
+ [frames, isNewestFirst, activeStacktrace.framesOmitted]
);
const rows = useMemo(