Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Fragment, useState} from 'react';
import {useTheme} from '@emotion/react';
import type {Location} from 'history';

import {Tag} from '@sentry/scraps/badge';
import {FeatureBadge, Tag} from '@sentry/scraps/badge';
import {LinkButton} from '@sentry/scraps/button';
import {InfoText} from '@sentry/scraps/info';
import {Flex, Grid, Stack} from '@sentry/scraps/layout';
Expand Down Expand Up @@ -191,28 +191,21 @@ function LifecycleFoldSection({
children: React.ReactNode;
tag?: React.ReactNode;
}) {
const title = (
<TraceDrawerComponents.SectionTitleWithQuestionTooltip
title={t('Cache Lifecycle')}
tooltipText={t(
'A cache-specific summary of this span’s attributes and links. Times are relative to this span.'
)}
/>
);

return (
<FoldSection
sectionKey="cache-lifecycle"
disableCollapsePersistence
title={
tag ? (
<Flex gap="sm" align="center">
{title}
{tag}
</Flex>
) : (
title
)
<Flex gap="sm" align="center">
<TraceDrawerComponents.SectionTitleWithQuestionTooltip
title={t('Cache lifecycle')}
tooltipText={t(
'A cache-specific summary of this span’s attributes and links. Times are relative to this span.'
)}
/>
<FeatureBadge type="new" />
{tag}
</Flex>
}
>
<Timeline.Container>{children}</Timeline.Container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('ServerRenderingSection', () => {
links: [makeLink('cache_origin')],
});

expect(screen.getByText('Server Rendering')).toBeInTheDocument();
expect(screen.getByText('Server rendering')).toBeInTheDocument();
expect(screen.getByText('Static')).toBeInTheDocument();
expect(screen.getByText('Whole page')).toBeInTheDocument();
expect(screen.getByText('Rendered earlier and reused')).toBeInTheDocument();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {IconOpen} from '@sentry/icons/open';
import type {Location} from 'history';

import {Tag} from '@sentry/scraps/badge';
import {FeatureBadge, Tag} from '@sentry/scraps/badge';
import {Button} from '@sentry/scraps/button';
import {Flex, Stack} from '@sentry/scraps/layout';
import {Link} from '@sentry/scraps/link';
Expand Down Expand Up @@ -116,11 +116,12 @@ function SectionTitle({type}: {type: ServerRenderingType | undefined}) {
return (
<Flex gap="sm" align="center">
<TraceDrawerComponents.SectionTitleWithQuestionTooltip
title={t('Server Rendering')}
title={t('Server rendering')}
tooltipText={t(
'Where the server spans of this page are. A reused part has its spans in the trace that rendered it.'
)}
/>
<FeatureBadge type="new" />
{type ? <Tag variant="muted">{TYPE_LABELS[type]}</Tag> : null}
</Flex>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,28 +410,24 @@ function EAPSpanNodeDetailsContent({
avgSpanDuration={avgSpanDuration}
hideNodeActions={hideNodeActions}
/>
{organization.features.includes('performance-trace-cache-lifecycle') ? (
<Fragment>
<CacheLifecycleSection
node={node}
attributes={attributes}
links={links}
location={location}
organization={organization}
tree={tree}
onTabScrollToNode={onTabScrollToNode}
/>
<ServerRenderingSection
node={node}
attributes={attributes}
links={links}
location={location}
organization={organization}
tree={tree}
onTabScrollToNode={onTabScrollToNode}
/>
</Fragment>
) : null}
<CacheLifecycleSection
node={node}
attributes={attributes}
links={links}
location={location}
organization={organization}
tree={tree}
onTabScrollToNode={onTabScrollToNode}
/>
<ServerRenderingSection
node={node}
attributes={attributes}
links={links}
location={location}
organization={organization}
tree={tree}
onTabScrollToNode={onTabScrollToNode}
/>
<AIIOAlert node={node} attributes={attributes} />
<AIInputSection
node={node}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import {isServerRenderNode} from 'sentry/views/performance/traceDetails/traceGua
import {TraceTree} from './traceTree';
import {makeEAPSpan, makeEAPTrace} from './traceTreeTestUtils';

const organization = OrganizationFixture({
features: ['performance-trace-cache-lifecycle'],
});
const organization = OrganizationFixture();
const start = new Date('2024-02-29T00:00:00Z').getTime() / 1e3;

function makeDocumentRequest() {
Expand Down Expand Up @@ -46,8 +44,8 @@ function makePageload(
});
}

function buildTree(pageload: ReturnType<typeof makePageload>, org = organization) {
return TraceTree.FromTrace(makeEAPTrace([pageload]), {replay: null, organization: org});
function buildTree(pageload: ReturnType<typeof makePageload>) {
return TraceTree.FromTrace(makeEAPTrace([pageload]), {replay: null, organization});
}

function getPageload(tree: TraceTree) {
Expand Down Expand Up @@ -161,10 +159,4 @@ eap trace root

expect(tree.root.findChild(isServerRenderNode)).toBeNull();
});

it('adds no placeholder without the feature', () => {
const tree = buildTree(makePageload('static'), OrganizationFixture());

expect(tree.root.findChild(isServerRenderNode)).toBeNull();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,7 @@ export class TraceTree extends TraceTreeEventDispatcher {

tree.indicators.sort((a, b) => a.start - b.start);

if (options.organization.features.includes('performance-trace-cache-lifecycle')) {
TraceTree.AddServerRenderPlaceholders(tree.root);
}
TraceTree.AddServerRenderPlaceholders(tree.root);

TraceTree.ApplyPreferences(tree.root, options);

Expand Down
Loading