Skip to content

chore(telemetry): track the view used to run queries #6839

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/compass-crud/src/stores/crud-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1595,6 +1595,7 @@ class CrudStoreImpl
? 'readonly'
: 'collection',
used_regex: objectContainsRegularExpression(query.filter ?? {}),
mode: this.modeForTelemetry(),
},
this.connectionInfoRef.current
);
Expand Down
7 changes: 6 additions & 1 deletion packages/compass-telemetry/src/telemetry-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,11 @@ type QueryExecutedEvent = ConnectionScopedEvent<{
* Indicates whether the query used a regular expression.
*/
used_regex: boolean;

/**
* The view used to run the query.
*/
mode: 'list' | 'json' | 'table';
};
}>;

Expand Down Expand Up @@ -2313,7 +2318,7 @@ type AutoupdateDismissedEvent = CommonEvent<{
}>;

/**
* This event is fired when the user changes the items view type between list and grid.
* This event is fired when the user changes the items view type in the database and collection list between "list" and "grid".
*
* @category Database / Collection List
*/
Expand Down
Loading