Skip to content

Commit 307b237

Browse files
committed
fix(profiling): Query spans instead of discover on landing page
Searching transactions is going away as we move away from transactions as the SDK's transport for spans. On the Explore Profiles landing page's transactions table, query the `spans` dataset with an extra `is_transaction:true` clause instead of the deprecated `discover` (behind the scenes: `transactions`) dataset.
1 parent 8cafbe2 commit 307b237

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

static/app/utils/profiling/hooks/useProfileEvents.spec.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ describe('useProfileEvents', () => {
2626
body,
2727
match: [
2828
MockApiClient.matchQuery({
29-
dataset: 'discover',
30-
query: '(has:profile.id OR (has:profiler.id has:thread.id)) (transaction:foo)',
29+
dataset: 'spans',
30+
query:
31+
'is_transaction:true (has:profile.id OR (has:profiler.id has:thread.id)) (transaction:foo)',
3132
}),
3233
],
3334
});
@@ -54,7 +55,7 @@ describe('useProfileEvents', () => {
5455
url: `/organizations/${organization.slug}/events/`,
5556
status: 400,
5657
statusCode: 400,
57-
match: [MockApiClient.matchQuery({dataset: 'discover'})],
58+
match: [MockApiClient.matchQuery({dataset: 'spans'})],
5859
});
5960

6061
const {result} = renderHookWithProviders(useProfileEvents, {

static/app/utils/profiling/hooks/useProfileEvents.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ export function useProfileEvents<F extends string>({
3535
const organization = useOrganization();
3636
const {selection} = usePageFilters();
3737

38-
query = `(has:profile.id OR (has:profiler.id has:thread.id)) ${query ? `(${query})` : ''}`;
38+
query = `is_transaction:true (has:profile.id OR (has:profiler.id has:thread.id)) ${query ? `(${query})` : ''}`;
3939

4040
const endpointOptions = {
4141
query: {
42-
dataset: 'discover',
42+
dataset: 'spans',
4343
referrer,
4444
project: projects || selection.projects,
4545
environment: selection.environments,

static/app/views/profiling/content.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ function ProfilingContentPageHeader() {
397397
const ALL_FIELDS = [
398398
'transaction',
399399
'project.id',
400-
'last_seen()',
401400
'p50()',
402401
'p75()',
403402
'p95()',

static/app/views/profiling/profileSummary/profileSummaryPage.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('ProfileSummaryPage', () => {
5151
MockApiClient.addMockResponse({
5252
url: `/organizations/${organization.slug}/events/`,
5353
body: {
54-
data: [{'last_seen()': new Date()}],
54+
data: [{transaction: '/test'}],
5555
},
5656
});
5757

0 commit comments

Comments
 (0)