Skip to content

Commit 2974b6a

Browse files
Abdkhan14Abdullah Khan
authored andcommitted
feat(trace-view): Removing trace-view-v1 flag (#94474)
This PR removes all usage of the 'trace-view-v1' flag from the FE. It has been in full GA over the last couple quarters and we want the linked functionality to be enabled by default in self hosted. --------- Co-authored-by: Abdullah Khan <[email protected]>
1 parent 2d9680e commit 2974b6a

File tree

76 files changed

+111
-751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+111
-751
lines changed

static/app/components/events/eventStatisticalDetector/eventComparison/eventDisplay.spec.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,12 @@ describe('eventDisplay', () => {
130130
MockApiClient.addMockResponse({
131131
url: `/organizations/org-slug/events/${mockProject.slug}:mock-id/`,
132132
method: 'GET',
133-
body: EventFixture({tags: [{key: 'mock-tag', value: 'mock-value'}]}),
133+
body: EventFixture({
134+
tags: [{key: 'mock-tag', value: 'mock-value'}],
135+
contexts: {
136+
trace: {trace_id: 'trace-id'},
137+
},
138+
}),
134139
});
135140

136141
render(
@@ -146,7 +151,10 @@ describe('eventDisplay', () => {
146151

147152
expect(
148153
await screen.findByRole('button', {name: 'Full Event Details'})
149-
).toHaveAttribute('href', '/organizations/org-slug/insights/backend/project-slug:1/');
154+
).toHaveAttribute(
155+
'href',
156+
'/organizations/org-slug/traces/trace/trace-id/?statsPeriod=14d'
157+
);
150158
});
151159

152160
it('allows for pagination if there are more events loaded', async () => {

static/app/components/events/eventStatisticalDetector/eventComparison/eventDisplay.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ function EventDisplay({
197197
const traceSlug = eventData.contexts?.trace?.trace_id ?? '';
198198
const fullEventTarget = generateLinkToEventInTraceView({
199199
eventId: eventData.id,
200-
projectSlug: project.slug,
201200
traceSlug,
202201
timestamp: eventData.endTimestamp,
203202
location,

static/app/components/events/interfaces/breadcrumbs/breadcrumb/data/default.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,12 @@ function FormatMessage({
9696
return content;
9797
}
9898

99-
const projectSlug = maybeProject.slug;
10099
const description = transactionData ? (
101100
<Link
102101
to={generateLinkToEventInTraceView({
103102
eventId: message,
104103
timestamp: transactionData.timestamp,
105104
traceSlug: transactionData.trace,
106-
projectSlug,
107105
organization,
108106
location: {...location, query: {...location.query, referrer: 'breadcrumbs'}},
109107
})}

static/app/components/events/interfaces/breadcrumbs/breadcrumbs.spec.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ describe('Breadcrumbs', () => {
2222

2323
props = {
2424
organization: OrganizationFixture(),
25-
event: EventFixture({entries: [], projectID: project.id}),
25+
event: EventFixture({
26+
entries: [],
27+
projectID: project.id,
28+
contexts: {trace: {trace_id: 'trace-id'}},
29+
}),
2630
data: {
2731
values: [
2832
{
@@ -80,6 +84,7 @@ describe('Breadcrumbs', () => {
8084
title: '/settings/',
8185
'project.name': 'javascript',
8286
id: 'abcdabcdabcdabcdabcdabcdabcdabcd',
87+
trace: 'trace-id',
8388
},
8489
],
8590
meta: {},
@@ -209,7 +214,7 @@ describe('Breadcrumbs', () => {
209214

210215
expect(screen.getByText('/settings/')).toHaveAttribute(
211216
'href',
212-
'/organizations/org-slug/insights/backend/project-slug:abcdabcdabcdabcdabcdabcdabcdabcd/?referrer=breadcrumbs'
217+
'/organizations/org-slug/traces/trace/trace-id/?referrer=breadcrumbs&statsPeriod=14d'
213218
);
214219
});
215220
});

static/app/components/events/interfaces/performance/spanEvidenceKeyValueList.spec.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe('SpanEvidenceKeyValueList', () => {
7070
);
7171
expect(screen.getByRole('button', {name: 'View Full Trace'})).toHaveAttribute(
7272
'href',
73-
'/organizations/org-slug/insights/backend/project:a1/'
73+
'/organizations/org-slug/traces/trace/8cbbc19c0f54447ab702f00263262726/?eventId=a1&statsPeriod=14d&timestamp=4'
7474
);
7575

7676
expect(screen.getByRole('cell', {name: 'Parent Span'})).toBeInTheDocument();
@@ -144,7 +144,7 @@ describe('SpanEvidenceKeyValueList', () => {
144144
);
145145
expect(screen.getByRole('button', {name: 'View Full Trace'})).toHaveAttribute(
146146
'href',
147-
'/organizations/org-slug/insights/backend/project:a1/'
147+
'/organizations/org-slug/traces/trace/8cbbc19c0f54447ab702f00263262726/?eventId=a1&statsPeriod=14d&timestamp=4'
148148
);
149149

150150
expect(screen.getByRole('cell', {name: 'Parent Span'})).toBeInTheDocument();
@@ -227,7 +227,7 @@ describe('SpanEvidenceKeyValueList', () => {
227227
);
228228
expect(screen.getByRole('button', {name: 'View Full Trace'})).toHaveAttribute(
229229
'href',
230-
'/organizations/org-slug/insights/backend/project:a1/'
230+
'/organizations/org-slug/traces/trace/8cbbc19c0f54447ab702f00263262726/?eventId=a1&statsPeriod=14d&timestamp=4'
231231
);
232232

233233
expect(screen.getByRole('cell', {name: 'Parent Span'})).toBeInTheDocument();
@@ -320,7 +320,7 @@ describe('SpanEvidenceKeyValueList', () => {
320320
);
321321
expect(screen.getByRole('button', {name: 'View Full Trace'})).toHaveAttribute(
322322
'href',
323-
'/organizations/org-slug/insights/backend/project:a1/'
323+
'/organizations/org-slug/traces/trace/8cbbc19c0f54447ab702f00263262726/?eventId=a1&statsPeriod=14d&timestamp=0.65'
324324
);
325325

326326
expect(screen.getByRole('cell', {name: 'Starting Span'})).toBeInTheDocument();
@@ -472,7 +472,7 @@ describe('SpanEvidenceKeyValueList', () => {
472472
);
473473
expect(screen.getByRole('button', {name: 'View Full Trace'})).toHaveAttribute(
474474
'href',
475-
'/organizations/org-slug/insights/backend/project:a1/'
475+
'/organizations/org-slug/traces/trace/8cbbc19c0f54447ab702f00263262726/?eventId=a1&statsPeriod=14d&timestamp=2100'
476476
);
477477

478478
expect(screen.getByRole('cell', {name: 'Repeating Spans (2)'})).toBeInTheDocument();
@@ -632,7 +632,7 @@ describe('SpanEvidenceKeyValueList', () => {
632632
);
633633
expect(screen.getByRole('button', {name: 'View Full Trace'})).toHaveAttribute(
634634
'href',
635-
'/organizations/org-slug/insights/backend/project:a1/'
635+
'/organizations/org-slug/traces/trace/8cbbc19c0f54447ab702f00263262726/?eventId=a1&statsPeriod=14d&timestamp=10100'
636636
);
637637

638638
expect(screen.getByRole('cell', {name: 'Slow DB Query'})).toBeInTheDocument();
@@ -685,7 +685,7 @@ describe('SpanEvidenceKeyValueList', () => {
685685
);
686686
expect(screen.getByRole('button', {name: 'View Full Trace'})).toHaveAttribute(
687687
'href',
688-
'/organizations/org-slug/insights/backend/project:a1/'
688+
'/organizations/org-slug/traces/trace/8cbbc19c0f54447ab702f00263262726/?eventId=a1&statsPeriod=14d&timestamp=3'
689689
);
690690

691691
expect(screen.getByRole('cell', {name: 'Slow Resource Span'})).toBeInTheDocument();
@@ -749,7 +749,7 @@ describe('SpanEvidenceKeyValueList', () => {
749749
);
750750
expect(screen.getByRole('button', {name: 'View Full Trace'})).toHaveAttribute(
751751
'href',
752-
'/organizations/org-slug/insights/backend/project:a1/'
752+
'/organizations/org-slug/traces/trace/8cbbc19c0f54447ab702f00263262726/?eventId=a1&statsPeriod=14d&timestamp=0.931'
753753
);
754754

755755
expect(screen.getByRole('cell', {name: 'Slow Resource Span'})).toBeInTheDocument();
@@ -849,7 +849,7 @@ describe('SpanEvidenceKeyValueList', () => {
849849
);
850850
expect(screen.getByRole('button', {name: 'View Full Trace'})).toHaveAttribute(
851851
'href',
852-
'/organizations/org-slug/insights/backend/project:a1/'
852+
'/organizations/org-slug/traces/trace/8cbbc19c0f54447ab702f00263262726/?eventId=a1&statsPeriod=14d&timestamp=0.487'
853853
);
854854

855855
expect(

static/app/components/events/interfaces/performance/spanEvidenceKeyValueList.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,6 @@ const makeTransactionNameRow = (
545545

546546
const eventDetailsLocation = generateLinkToEventInTraceView({
547547
traceSlug,
548-
projectSlug: projectSlug ?? '',
549548
eventId: event.eventID,
550549
timestamp: event.endTimestamp ?? '',
551550
location,

static/app/components/events/interfaces/spans/aggregateSpanDetail.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ function renderSpanSamples(
5454
to={generateLinkToEventInTraceView({
5555
organization,
5656
traceSlug: trace,
57-
projectSlug: project.slug,
5857
eventId: transaction,
5958
timestamp,
6059
location: {

static/app/components/events/profileEventEvidence.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe('ProfileEventEvidence', function () {
6060

6161
expect(screen.getByRole('button', {name: 'View Transaction'})).toHaveAttribute(
6262
'href',
63-
'/organizations/org-slug/insights/backend/project-slug:transaction-id/?referrer=issue'
63+
'/organizations/org-slug/traces/trace/trace-id/?referrer=issue&statsPeriod=14d'
6464
);
6565
});
6666
});

static/app/components/events/profileEventEvidence.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export function ProfileEventEvidence({event, projectSlug}: ProfileEvidenceProps)
3333
traceSlug,
3434
timestamp: evidenceData.timestamp,
3535
eventId: evidenceData.transactionId,
36-
projectSlug,
3736
location: {...location, query: {...location.query, referrer: 'issue'}},
3837
organization,
3938
})}

static/app/components/profiling/continuousProfileHeader.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@ import {useLocation} from 'sentry/utils/useLocation';
1515
import useOrganization from 'sentry/utils/useOrganization';
1616

1717
interface ContinuousProfileHeader {
18-
projectId: string;
1918
transaction: Event | null;
2019
}
2120

22-
export function ContinuousProfileHeader({
23-
transaction,
24-
projectId,
25-
}: ContinuousProfileHeader) {
21+
export function ContinuousProfileHeader({transaction}: ContinuousProfileHeader) {
2622
const location = useLocation();
2723
const organization = useOrganization();
2824

@@ -31,13 +27,10 @@ export function ContinuousProfileHeader({
3127
return [{type: 'landing', payload: {query: {}}}];
3228
}, []);
3329

34-
const projectSlug = projectId ?? '';
35-
3630
const transactionTarget = transaction?.id
3731
? generateLinkToEventInTraceView({
3832
timestamp: transaction.endTimestamp ?? '',
3933
eventId: transaction.id,
40-
projectSlug,
4134
traceSlug: transaction.contexts?.trace?.trace_id ?? '',
4235
location,
4336
organization,

0 commit comments

Comments
 (0)