-
Notifications
You must be signed in to change notification settings - Fork 76
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
Collapsable trace tree #312
Conversation
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.
👍 Looks good to me! Reviewed everything up to 3009424 in 36 seconds
More details
- Looked at
254
lines of code in6
files - Skipped
1
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. app-server/src/features/mod.rs:32
- Draft comment:
Ensure that the environment variableMACHINE_MANAGER_URL_GRPC
is documented and set appropriately in all environments where this feature might be used. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces a new feature flagMachineManager
and updates the logic to check for this feature using the environment variableMACHINE_MANAGER_URL_GRPC
. This is consistent with the existing pattern for feature flags in the codebase.
2. app-server/src/main.rs:296
- Draft comment:
Ensure that theMACHINE_MANAGER_URL_GRPC
environment variable is set in environments where theMachineManager
feature is enabled. - Reason this comment was not posted:
Confidence changes required:50%
The PR updates the feature flag check inmain.rs
to use the newMachineManager
feature. This is consistent with the changes infeatures/mod.rs
.
3. frontend/components/traces/span-card.tsx:22
- Draft comment:
Consider adding PropTypes or TypeScript interfaces to ensurecollapsedSpans
andonToggleCollapse
are passed correctly toSpanCard
. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces a new feature to collapse spans in the trace view. TheSpanCard
component now acceptscollapsedSpans
andonToggleCollapse
props to manage the collapsed state of spans.
4. frontend/components/traces/timeline.tsx:44
- Draft comment:
Ensure thatcollapsedSpans
is correctly managed and updated to reflect the current state of the UI. - Reason this comment was not posted:
Confidence changes required:50%
TheTimeline
component now considerscollapsedSpans
to determine which spans to display. This is consistent with the new feature to collapse spans.
5. frontend/components/traces/trace-view.tsx:53
- Draft comment:
Consider adding a function to resetcollapsedSpans
when the trace data changes to ensure the UI reflects the current data accurately. - Reason this comment was not posted:
Confidence changes required:50%
TheTraceView
component manages the state ofcollapsedSpans
and passes it toSpanCard
andTimeline
. This is consistent with the new feature to collapse spans.
Workflow ID: wflow_tzDDPTaFTRpqnT78
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
❌ Changes requested. Incremental review on 75a2ac5 in 39 seconds
More details
- Looked at
20
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_RG7BnqwnqEO1Py8R
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
setTimelineWidth( | ||
container.current!.getBoundingClientRect().width | ||
); | ||
setTimeout(() => { |
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.
Using setTimeout
with a delay of 10ms is not a reliable way to ensure state updates before URL changes. Consider using a callback or a state effect to handle this synchronously.
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.
👍 Looks good to me! Incremental review on 0dfb838 in 45 seconds
More details
- Looked at
53
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. frontend/components/traces/timeline.tsx:51
- Draft comment:
The dependency array foruseCallback
is incomplete. It should includechildSpans
as it is used within thetraverse
function.
[collapsedSpans, childSpans]
- Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The key insight is that childSpans is passed as an argument to traverse, not accessed from the outer scope. React's useCallback is only needed for dependencies accessed from closure scope. Arguments passed directly to the function don't need to be in the dependency array. Only collapsedSpans is accessed from closure scope.
Could there be a performance benefit to memoizing based on childSpans changes? Could there be edge cases where childSpans closure capture matters?
No - since childSpans is passed as an argument, the current implementation is correct. Adding unnecessary dependencies would actually hurt performance by causing more re-renders.
The comment should be deleted. The current dependency array is correct since childSpans is passed as an argument and not accessed from closure scope.
Workflow ID: wflow_D9vD9H6I67DxaZBZ
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Add collapsible trace tree feature in frontend and MachineManager feature flag in backend.
span-card.tsx
,timeline.tsx
, andtrace-view.tsx
.collapsedSpans
state to manage collapsed spans.SpanCard
andTimeline
components to handle span collapse/expand actions.MachineManager
feature flag infeatures/mod.rs
.main.rs
to useMachineManager
feature flag instead ofFullBuild
for machine manager initialization.posthog-js
version inpackage.json
.This description was created by for 0dfb838. It will automatically update as commits are pushed.