-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(trace-tree-node): Mitigating txn node type guards usage #104498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: abdk/trace-tree-node-eap-span-guard-usage
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,6 @@ import { | |
| } from 'sentry/views/insights/agents/utils/query'; | ||
| import type {AITraceSpanNode} from 'sentry/views/insights/agents/utils/types'; | ||
| import {SpanFields} from 'sentry/views/insights/types'; | ||
| import {isTransactionNode} from 'sentry/views/performance/newTraceDetails/traceGuards'; | ||
| import type {EapSpanNode} from 'sentry/views/performance/newTraceDetails/traceModels/traceTreeNode/eapSpanNode'; | ||
| import type {TransactionNode} from 'sentry/views/performance/newTraceDetails/traceModels/traceTreeNode/transactionNode'; | ||
|
|
||
|
|
@@ -266,12 +265,6 @@ function getNodeInfo(node: AITraceSpanNode, colors: readonly string[]) { | |
| color: colors[1], | ||
| }; | ||
|
|
||
| if (isTransactionNode(node)) { | ||
| nodeInfo.title = node.value.transaction || 'Transaction'; | ||
| nodeInfo.subtitle = node.value['transaction.op'] || ''; | ||
| return nodeInfo; | ||
| } | ||
|
|
||
| const op = node.op ?? 'default'; | ||
| const truncatedOp = op.startsWith('gen_ai.') ? op.slice(7) : op; | ||
| nodeInfo.title = truncatedOp; | ||
|
|
@@ -328,10 +321,10 @@ function getNodeInfo(node: AITraceSpanNode, colors: readonly string[]) { | |
| nodeInfo.color = colors[5]; | ||
| } else if (getIsHandoffSpan({op})) { | ||
| nodeInfo.icon = <IconChevron size="md" isDouble direction="right" />; | ||
| nodeInfo.subtitle = node.value.description || ''; | ||
| nodeInfo.subtitle = node.description || ''; | ||
| nodeInfo.color = colors[4]; | ||
| } else { | ||
| nodeInfo.subtitle = node.value.description || ''; | ||
| nodeInfo.subtitle = node.description || ''; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: TransactionNode title and subtitle are swapped after changeRemoving the |
||
| } | ||
|
|
||
| // Override the color and icon if the node has errors | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to look for
'transaction.op'specifically in value, we can use thebaseNode.opgetter