forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution][Alert Details] - add general telemetry for docume…
…nt details flyout (elastic#178683) ## Summary Add telemetry to track basic usage of the document details flyout for alerts and events: - `reportDetailsFlyoutOpened` tracks opening details flyout, expanding left section and opening a preview - `reportDetailsFlyoutTabClicked` tracks tabs clicked Flyout dashboard in [staging](https://telemetry-v2-staging.elastic.dev/s/securitysolution/app/dashboards#/view/093a84d0-dfec-11ee-8356-8b8a68fd8ef2?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-3d,to:now))) ![image](https://github.com/elastic/kibana/assets/18648970/ae46388f-1d8a-4abb-9bad-60f6582d3015) How to test - add `telemetry.optIn: true` to `kibana.dev.yaml` - interact with details flyout in data table (Alerts page, Host/User page, Cases Page) - the data should be fed to staging every hour or so ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
1 parent
6fdfa25
commit 9ba0dc1
Showing
22 changed files
with
203 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
56 changes: 56 additions & 0 deletions
56
...ck/plugins/security_solution/public/common/lib/telemetry/events/document_details/index.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { TelemetryEvent } from '../../types'; | ||
import { TelemetryEventTypes } from '../../constants'; | ||
|
||
export const DocumentDetailsFlyoutOpenedEvent: TelemetryEvent = { | ||
eventType: TelemetryEventTypes.DetailsFlyoutOpened, | ||
schema: { | ||
tableId: { | ||
type: 'text', | ||
_meta: { | ||
description: 'Table ID', | ||
optional: false, | ||
}, | ||
}, | ||
panel: { | ||
type: 'keyword', | ||
_meta: { | ||
description: 'Panel (left|right|preview)', | ||
optional: false, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export const DocumentDetailsTabClickedEvent: TelemetryEvent = { | ||
eventType: TelemetryEventTypes.DetailsFlyoutTabClicked, | ||
schema: { | ||
tableId: { | ||
type: 'text', | ||
_meta: { | ||
description: 'Table ID', | ||
optional: false, | ||
}, | ||
}, | ||
panel: { | ||
type: 'keyword', | ||
_meta: { | ||
description: 'Panel (left|right)', | ||
optional: false, | ||
}, | ||
}, | ||
tabId: { | ||
type: 'keyword', | ||
_meta: { | ||
description: 'Tab ID', | ||
optional: false, | ||
}, | ||
}, | ||
}, | ||
}; |
34 changes: 34 additions & 0 deletions
34
...ck/plugins/security_solution/public/common/lib/telemetry/events/document_details/types.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { RootSchema } from '@kbn/analytics-client'; | ||
import type { TelemetryEventTypes } from '../../constants'; | ||
|
||
export interface ReportDetailsFlyoutOpenedParams { | ||
tableId: string; | ||
panel: 'left' | 'right' | 'preview'; | ||
} | ||
|
||
export interface ReportDetailsFlyoutTabClickedParams { | ||
tableId: string; | ||
panel: 'left' | 'right'; | ||
tabId: string; | ||
} | ||
|
||
export type ReportDocumentDetailsTelemetryEventParams = | ||
| ReportDetailsFlyoutOpenedParams | ||
| ReportDetailsFlyoutTabClickedParams; | ||
|
||
export type DocumentDetailsTelemetryEvents = | ||
| { | ||
eventType: TelemetryEventTypes.DetailsFlyoutOpened; | ||
schema: RootSchema<ReportDetailsFlyoutOpenedParams>; | ||
} | ||
| { | ||
eventType: TelemetryEventTypes.DetailsFlyoutTabClicked; | ||
schema: RootSchema<ReportDetailsFlyoutTabClickedParams>; | ||
}; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.