-
Notifications
You must be signed in to change notification settings - Fork 41.9k
chore(editor): Add telemetry for canvas experiment #18871
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
Conversation
BundleMonUnchanged files (2)
No change in files bundle size Groups updated (2)
Final result: ✅ View report in BundleMon website ➡️ |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
@claude please review changes |
Claude finished @autologie's task —— View job Code Review Completed ✅I've reviewed the telemetry implementation for the canvas experiment. Here's my comprehensive feedback: ✅ Strengths1. Well-designed telemetry context system
2. Strategic telemetry placement
3. Consistent integration patterns
🔍 Areas for Improvement1. Test coverage concerns (Codecov: 65.58%)
2. Potential performance considerations
3. Type safety edge cases // In focusPanel.store.ts:174-182
focusedNodeParametersInTelemetryFormat: computed<
Array<{ parameterPath: string; nodeType: string; nodeId: string }>
>(() =>
focusedNodeParameters.value.map((x) => ({
// nodeType could be 'unresolved' - consider a more specific union type
nodeType: isRichParameter(x) ? x.node.type : 'unresolved', 4. Minor consistency issues
🎯 Recommendations
📦 Bundle Impact AssessmentThe +359KB JS increase seems reasonable for comprehensive telemetry instrumentation across 36 files. The size impact is acceptable for the observability value gained. ✅ Overall AssessmentThis is a well-architected telemetry implementation that follows Vue 3 best practices and integrates cleanly with the existing codebase. The main concern is test coverage, but the core design and implementation quality are solid. The telemetry will provide valuable insights into how users interact with the different canvas experiment views. Recommendation: Approve with minor improvements - Address test coverage and consider the performance optimizations mentioned above. |
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.
Just so to make it easier to find where telemetry is sent in the codebase by grep
? undefined | ||
: experimentalNdvStore.isNdvInFocusPanelEnabled && | ||
focusPanelStore.focusPanelActive && | ||
focusPanelStore.resolvedParameter === undefined |
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.
Here I'm also tweaking the condition itself to account for the case where the parameter is not enriched
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.
2 issues found across 36 files
React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
.../frontend/editor-ui/src/components/SettingsLogStreaming/EventDestinationSettingsModal.ee.vue
Show resolved
Hide resolved
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.
I like the idea! It makes our telemetry usage cleaner. I'd love to see this composable used in other places too.
| 'other'; | ||
|
||
export interface TelemetryContext { | ||
view_shown: TelemetryNdvType; |
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.
I would like this composable to be as reusable as possible, not scoped to the ndv. The naming view_shown
kind of suggests that you indicate what route you're on.
Can we rename it to something like { view_shown: 'ndv', ndv_source: TelemetryNdvType }
or just { ndv_source: TelemetryNdvType }
instead?
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.
Interesting idea, I updated like e292ec1, what do you think? Note that we still need lastSetActiveNodeSource
in NDV store because useTelemetryContext
is essentially just an inject/provide.
8a71789
to
e292ec1
Compare
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.
Looking great! Thank you for addressing the feedback!
E2E Tests: n8n tests passed after 5m 32.4s Run Details
Groups
This message was posted automatically by
currents.dev | Integration Settings
|
Summary
This PR implements telemetry events for the focus panel with canvas experiment. To try out the branch, paste
featureFlags.override('ndv_in_focus_panel', 'variant');
in the browser's console.Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/SUG-120/feature-telemetry-for-focus-panel
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)