Skip to content

Commit 76627d7

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 01a1fc9 commit 76627d7

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

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)