Skip to content
Merged
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-indexes/src/modules/regular-indexes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ export function createRegularIndex(
await dispatch(refreshRegularIndexes());
} catch (err) {
dispatch(indexCreationFailed(inProgressIndexId, (err as Error).message));
track('Index Create Failed', trackEvent, connectionInfoRef.current);
}
};
}
Expand Down
8 changes: 8 additions & 0 deletions packages/compass-indexes/src/modules/search-indexes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,14 @@ export const createIndex = ({
dispatch(
createSearchIndexFailed(ATLAS_SEARCH_SERVER_ERRORS[error] || error)
);
track(
'Index Create Failed',
{
atlas_search: true,
type,
},
connectionInfoRef.current
);
return;
}

Expand Down
57 changes: 57 additions & 0 deletions packages/compass-telemetry/src/telemetry-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,62 @@ type IndexCreatedEvent = ConnectionScoped<{
};
}>;

/**
* This event is fired when user creates an index and it fails.
*
* @category Indexes
*/
type IndexCreateFailedEvent = ConnectionScoped<{
name: 'Index Create Failed';

payload: {
/**
* Indicates whether the index is unique.
*/
unique?: boolean;

/**
* Specifies the time-to-live (TTL) setting for the index.
*/
ttl?: any;

/**
* Indicates whether the index is a columnstore index.
*/
columnstore_index?: boolean;

/**
* Indicates if the index has a columnstore projection.
*/
has_columnstore_projection?: any;

/**
* Indicates if the index includes a wildcard projection.
*/
has_wildcard_projection?: any;

/**
* Specifies if the index uses a custom collation.
*/
custom_collation?: any;

/**
* Indicates whether the index is a geospatial index.
*/
geo?: boolean;

/**
* Indicates whether the index is an Atlas Search index.
*/
atlas_search?: boolean;

/**
* Specifies the type of the index.
*/
type?: string;
};
}>;

/**
* This event is fired when user updates an index.
*
Expand Down Expand Up @@ -2556,6 +2612,7 @@ export type TelemetryEvent =
| ImportErrorLogOpenedEvent
| ImportOpenedEvent
| IndexCreatedEvent
| IndexCreateFailedEvent
| IndexCreateOpenedEvent
| IndexDroppedEvent
| IndexEditedEvent
Expand Down
Loading