Skip to content

Commit

Permalink
feat(waterfall): some more processing to handle waterfall collapse nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
vikrantgupta25 committed Jan 8, 2025
1 parent 0cb710e commit 2025365
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion frontend/src/api/trace/getTraceV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,19 @@ const getTraceV2 = async (
props: GetTraceV2PayloadProps,
): Promise<SuccessResponse<GetTraceV2SuccessResponse> | ErrorResponse> => {
try {
let uncollapsedNodes = [...props.uncollapsedNodes];
if (!props.isInterestedSpanIdUnCollapsed) {
uncollapsedNodes = uncollapsedNodes.filter(
(node) => node !== props.interestedSpanId,
);
}
const postData: GetTraceV2PayloadProps = {
...props,
uncollapsedNodes,
};
const response = await axios.post<GetTraceV2SuccessResponse>(
`/traces/${props.traceId}`,
omit(props, 'traceId'),
omit(postData, 'traceId'),
);

return {
Expand Down

0 comments on commit 2025365

Please sign in to comment.