Skip to content

Commit 45e324c

Browse files
committed
register types
1 parent 0f5ed5c commit 45e324c

6 files changed

Lines changed: 44 additions & 8 deletions

File tree

x-pack/plugins/security_solution/public/common/lib/telemetry/constants.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ export enum TelemetryEventTypes {
6666
EntityDetailsClicked = 'Entity Details Clicked',
6767
EntityAlertsClicked = 'Entity Alerts Clicked',
6868
EntityRiskFiltered = 'Entity Risk Filtered',
69-
EntityStoreEnabled = 'Entity Store Enabled',
70-
EntityStoreDisabled = 'Entity Store Disabled',
69+
EntityStoreEnablement = 'Entity Store Enablement',
7170
EntityStoreInit = 'Entity Store Initialized',
7271
MLJobUpdate = 'ML Job Update',
7372
AddRiskInputToTimelineClicked = 'Add Risk Input To Timeline Clicked',

x-pack/plugins/security_solution/public/common/lib/telemetry/events/entity_analytics/index.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,36 @@ export const assetCriticalityCsvImportedEvent: TelemetryEvent = {
214214
},
215215
},
216216
};
217+
218+
export const entityStoreInitEvent: TelemetryEvent = {
219+
eventType: TelemetryEventTypes.EntityStoreInit,
220+
schema: {
221+
timestamp: {
222+
type: 'date',
223+
_meta: {
224+
description: 'Timestamp of the event',
225+
optional: false,
226+
},
227+
},
228+
},
229+
};
230+
231+
export const entityStoreEnablementEvent: TelemetryEvent = {
232+
eventType: TelemetryEventTypes.EntityStoreEnablement,
233+
schema: {
234+
timestamp: {
235+
type: 'date',
236+
_meta: {
237+
description: 'Timestamp of the event',
238+
optional: false,
239+
},
240+
},
241+
action: {
242+
type: 'keyword',
243+
_meta: {
244+
description: 'Event toggle action',
245+
optional: false,
246+
},
247+
},
248+
},
249+
};

x-pack/plugins/security_solution/public/common/lib/telemetry/events/entity_analytics/types.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,7 @@ export type EntityAnalyticsTelemetryEvent =
119119
schema: RootSchema<ReportAssetCriticalityCsvImportedParams>;
120120
}
121121
| {
122-
eventType: TelemetryEventTypes.EntityStoreEnabled;
123-
schema: RootSchema<ReportEntityStoreEnablementParams>;
124-
}
125-
| {
126-
eventType: TelemetryEventTypes.EntityStoreDisabled;
122+
eventType: TelemetryEventTypes.EntityStoreEnablement;
127123
schema: RootSchema<ReportEntityStoreEnablementParams>;
128124
}
129125
| {

x-pack/plugins/security_solution/public/common/lib/telemetry/events/telemetry_events.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import {
2121
assetCriticalityCsvPreviewGeneratedEvent,
2222
assetCriticalityFileSelectedEvent,
2323
assetCriticalityCsvImportedEvent,
24+
entityStoreEnablementEvent,
25+
entityStoreInitEvent,
2426
} from './entity_analytics';
2527
import {
2628
assistantInvokedEvent,
@@ -172,6 +174,8 @@ export const telemetryEvents = [
172174
assetCriticalityCsvPreviewGeneratedEvent,
173175
assetCriticalityFileSelectedEvent,
174176
assetCriticalityCsvImportedEvent,
177+
entityStoreEnablementEvent,
178+
entityStoreInitEvent,
175179
toggleRiskSummaryClickedEvent,
176180
RiskInputsExpandedFlyoutOpenedEvent,
177181
addRiskInputToTimelineClickedEvent,

x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export class TelemetryClient implements TelemetryClientStart {
220220
};
221221

222222
public reportEntityStoreEnablement = (params: ReportEntityStoreEnablementParams) => {
223-
this.analytics.reportEvent(TelemetryEventTypes.EntityStoreEnabled, params);
223+
this.analytics.reportEvent(TelemetryEventTypes.EntityStoreEnablement, params);
224224
};
225225

226226
public reportEntityStoreInit = (params: ReportEntityStoreInitParams) => {

x-pack/plugins/security_solution/server/lib/telemetry/event_based/events.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,4 +453,8 @@ export const events = [
453453
ENDPOINT_RESPONSE_ACTION_SENT_EVENT,
454454
ENDPOINT_RESPONSE_ACTION_SENT_ERROR_EVENT,
455455
ENDPOINT_RESPONSE_ACTION_STATUS_CHANGE_EVENT,
456+
FIELD_RETENTION_ENRICH_POLICY_EXECUTION_EVENT,
457+
ENTITY_ENGINE_RESOURCE_INIT_FAILURE_EVENT,
458+
ENTITY_ENGINE_INITIALIZATION_EVENT,
459+
ENTITY_STORE_USAGE_EVENT,
456460
];

0 commit comments

Comments
 (0)