File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1596,13 +1596,19 @@ class CrudStoreImpl
15961596
15971597 if ( onApply ) {
15981598 const { isTimeSeries, isReadonly } = this . state ;
1599+ const { defaultSortOrder } = this . preferences . getPreferences ( ) ;
15991600 this . track (
16001601 'Query Executed' ,
16011602 {
16021603 has_projection :
16031604 ! ! query . project && Object . keys ( query . project ) . length > 0 ,
16041605 has_skip : ( query . skip ?? 0 ) > 0 ,
16051606 has_sort : ! ! query . sort && Object . keys ( query . sort ) . length > 0 ,
1607+ default_sort : ! defaultSortOrder
1608+ ? 'none'
1609+ : / _ i d / . test ( defaultSortOrder )
1610+ ? '_id'
1611+ : 'natural' ,
16061612 has_limit : ( query . limit ?? 0 ) > 0 ,
16071613 has_collation : ! ! query . collation ,
16081614 changed_maxtimems : query . maxTimeMS !== DEFAULT_INITIAL_MAX_TIME_MS ,
Original file line number Diff line number Diff line change @@ -1735,6 +1735,11 @@ type QueryExecutedEvent = ConnectionScopedEvent<{
17351735 */
17361736 has_sort : boolean ;
17371737
1738+ /**
1739+ * Indicates which default sort was set in settings
1740+ */
1741+ default_sort : 'natural' | '_id' | 'none' ;
1742+
17381743 /**
17391744 * Indicates whether the query includes a limit operation.
17401745 */
You can’t perform that action at this time.
0 commit comments