Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion static/app/views/performance/newTraceDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ function TraceViewImpl({traceSlug}: {traceSlug: string}) {
const hideTraceWaterfallIfEmpty = (logsData?.length ?? 0) > 0;

const meta = useTraceMeta([{traceSlug, timestamp: queryParams.timestamp}]);
const trace = useTrace({traceSlug, timestamp: queryParams.timestamp});
const trace = useTrace({
traceSlug,
timestamp: queryParams.timestamp,
additionalAttributes: ['thread.id'],
});
const tree = useTraceTree({traceSlug, trace, replay: null});

useTraceStateAnalytics({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,22 @@ export function TraceProfiles({tree}: {tree: TraceTree}) {
return null;
}

const threadId = isEAPSpanNode(node)
? (node.value.additional_attributes?.['thread.id'] ?? undefined)
: undefined;
const tid = typeof threadId === 'string' ? threadId : undefined;

const query = isTransactionNode(node)
? {
eventId: node.value.event_id,
tid,
}
: isSpanNode(node)
? {
eventId: TraceTree.ParentTransaction(node)?.value?.event_id,
tid,
}
: {};
: {tid};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Missing eventId for EAP span profile links

The conditional logic for building the query object doesn't handle EAP span nodes explicitly. When the node is an EAP span (which is neither a transaction node nor a regular span node), it falls through to the else case at line 83, creating a query with only {tid}. This omits the eventId field that's needed for profile links. EAP span nodes have an event_id that should be included in the query, similar to how transaction nodes include their event_id.

Fix in Cursor Fix in Web


const link =
'profiler_id' in profile
Expand Down
Loading