Skip to content

Commit cbc4a8c

Browse files
authored
feat(explore): Support profile.id (#81318)
1 parent a4ac88d commit cbc4a8c

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

static/app/utils/discover/fieldRenderers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ const SPECIAL_FIELDS: SpecialFields = {
546546
sortField: 'profile.id',
547547
renderFunc: data => {
548548
const id: string | unknown = data?.['profile.id'];
549-
if (typeof id !== 'string') {
549+
if (typeof id !== 'string' || id === '') {
550550
return emptyValue;
551551
}
552552

static/app/views/explore/contexts/spanTagsContext.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export function SpanTagsProvider({children, dataset, enabled}: SpanTagsProviderP
7070
// as we're moving toward span ids
7171

7272
'id', // SpanIndexedField.SPAN_OP is actually `span_id`
73+
'profile.id', // SpanIndexedField.PROFILE_ID is actually `profile_id`
7374
SpanIndexedField.BROWSER_NAME,
7475
SpanIndexedField.ENVIRONMENT,
7576
SpanIndexedField.ORIGIN_TRANSACTION,

static/app/views/explore/tables/fieldRenderer.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {getFieldRenderer} from 'sentry/utils/discover/fieldRenderers';
99
import {Container} from 'sentry/utils/discover/styles';
1010
import {generateLinkToEventInTraceView} from 'sentry/utils/discover/urls';
1111
import {getShortEventId} from 'sentry/utils/events';
12+
import {generateProfileFlamechartRouteWithQuery} from 'sentry/utils/profiling/routes';
1213
import {MutableSearch} from 'sentry/utils/tokenizeSearch';
1314
import {useLocation} from 'sentry/utils/useLocation';
1415
import useOrganization from 'sentry/utils/useOrganization';
@@ -78,6 +79,15 @@ export function FieldRenderer({data, meta, unit, column}: FieldProps) {
7879
rendered = <Link to={target}>{rendered}</Link>;
7980
}
8081

82+
if (field === 'profile.id') {
83+
const target = generateProfileFlamechartRouteWithQuery({
84+
orgSlug: organization.slug,
85+
projectSlug: data.project,
86+
profileId: data['profile.id'],
87+
});
88+
rendered = <Link to={target}>{rendered}</Link>;
89+
}
90+
8191
return (
8292
<CellAction
8393
column={column}

0 commit comments

Comments
 (0)