chore(telemetry): add document field telemetry and document update cancelled COMPASS-10767 - #8308
Open
Anemy wants to merge 5 commits into
Open
chore(telemetry): add document field telemetry and document update cancelled COMPASS-10767#8308Anemy wants to merge 5 commits into
Anemy wants to merge 5 commits into
Conversation
Anemy
commented
Jul 31, 2026
| * Tracks how the user edits documents, so that various ways of | ||
| * editing (list, table and the insert dialog) can share similar tracking. | ||
| */ | ||
| export function useDocumentEditsTelemetry( |
Member
Author
There was a problem hiding this comment.
I opted for a hook here that listens to hadron-document events instead of drilling down props for each of these events to the various places that would emit them. Curious how y'all feel about this approach.
We'll also be adding field document edited and type changes here.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds new telemetry coverage for document field-level edits and edit-cancel actions in Compass CRUD, aligning tracking across the list/table views and the insert dialog.
Changes:
- Introduces new connection-scoped telemetry events for field add/remove and update cancellation.
- Adds a reusable
useDocumentEditsTelemetryhook that listens tohadron-documentedit/cancel events and emits the corresponding telemetry. - Wires the hook into the main documents list and the insert document modal, with a focused unit test suite for the hook.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/compass-telemetry/src/telemetry-events.ts | Adds the new telemetry event type definitions and includes them in the global TelemetryEvent union. |
| packages/compass-crud/src/hooks/use-document-edits-telemetry.ts | Implements centralized document edit telemetry wiring (field add/remove + update cancel). |
| packages/compass-crud/src/hooks/use-document-edits-telemetry.spec.tsx | Adds tests validating emitted events and connection scoping behavior. |
| packages/compass-crud/src/components/insert-document.tsx | Hooks insert-document editing UI into the shared telemetry hook for field add/remove tracking. |
| packages/compass-crud/src/components/document-list.tsx | Hooks list/table/json document editing UI into the shared telemetry hook for consistent tracking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
COMPASS-10767
Adds
Document Field Added,Document Field Removed, andDocument Update Cancelled. There will be one more pr with field editing and type changing.