Skip to content

Commit afbc76f

Browse files
mjqgeorge-sentry
authored andcommitted
fix(profiling): Query spans instead of discover on landing page (#112251)
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` (EAP) dataset with an extra `is_transaction:true` clause instead of the deprecated `discover` (behind the scenes: `transactions`) dataset. The only consequence is that we lose the **Last Seen** column, because this function is missing from EAP. Fixes DAIN-1448. <img width="1566" height="351" alt="Screenshot 2026-04-07 at 15 41 04" src="https://github.com/user-attachments/assets/14ac86c4-f539-4117-b457-d603bebda745" />
1 parent 66e8de7 commit afbc76f

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
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: 3 additions & 4 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,
@@ -88,5 +88,4 @@ type ProfilingFieldType =
8888
| 'p75()'
8989
| 'p95()'
9090
| 'p99()'
91-
| 'count()'
92-
| 'last_seen()';
91+
| 'count()';

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()',

0 commit comments

Comments
 (0)