Skip to content

Commit

Permalink
[8.14] [Security Solution][Alert details] - update telemetry property…
Browse files Browse the repository at this point in the history
… to better reflect where the flyout is opened from (#180984) (#181200)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[Security Solution][Alert details] - update telemetry property to
better reflect where the flyout is opened from
(#180984)](#180984)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Philippe
Oberti","email":"philippe.oberti@elastic.co"},"sourceCommit":{"committedDate":"2024-04-18T18:18:17Z","message":"[Security
Solution][Alert details] - update telemetry property to better reflect
where the flyout is opened from
(#180984)","sha":"cfee0fafb6e4bf272e547a3fa569ac390038fff3","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Threat
Hunting:Investigations","v8.14.0","v8.15.0"],"title":"[Security
Solution][Alert details] - update telemetry property to better reflect
where the flyout is opened
from","number":180984,"url":"https://github.com/elastic/kibana/pull/180984","mergeCommit":{"message":"[Security
Solution][Alert details] - update telemetry property to better reflect
where the flyout is opened from
(#180984)","sha":"cfee0fafb6e4bf272e547a3fa569ac390038fff3"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/180984","number":180984,"mergeCommit":{"message":"[Security
Solution][Alert details] - update telemetry property to better reflect
where the flyout is opened from
(#180984)","sha":"cfee0fafb6e4bf272e547a3fa569ac390038fff3"}}]}]
BACKPORT-->

Co-authored-by: Philippe Oberti <philippe.oberti@elastic.co>
  • Loading branch information
kibanamachine and PhilippeOberti authored Apr 18, 2024
1 parent 0a26c0d commit 1cfebf8
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const CaseContainerComponent: React.FC = () => {
},
});
telemetry.reportDetailsFlyoutOpened({
tableId: TimelineId.casePage,
location: TimelineId.casePage,
panel: 'right',
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const RowActionComponent = ({
},
});
telemetry.reportDetailsFlyoutOpened({
tableId,
location: tableId,
panel: 'right',
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { TelemetryEventTypes } from '../../constants';
export const DocumentDetailsFlyoutOpenedEvent: TelemetryEvent = {
eventType: TelemetryEventTypes.DetailsFlyoutOpened,
schema: {
tableId: {
location: {
type: 'text',
_meta: {
description: 'Table ID',
Expand All @@ -31,7 +31,7 @@ export const DocumentDetailsFlyoutOpenedEvent: TelemetryEvent = {
export const DocumentDetailsTabClickedEvent: TelemetryEvent = {
eventType: TelemetryEventTypes.DetailsFlyoutTabClicked,
schema: {
tableId: {
location: {
type: 'text',
_meta: {
description: 'Table ID',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import type { RootSchema } from '@kbn/analytics-client';
import type { TelemetryEventTypes } from '../../constants';

export interface ReportDetailsFlyoutOpenedParams {
tableId: string;
location: string;
panel: 'left' | 'right' | 'preview';
}

export interface ReportDetailsFlyoutTabClickedParams {
tableId: string;
location: string;
panel: 'left' | 'right';
tabId: string;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const LeftPanel: FC<Partial<LeftPanelProps>> = memo(({ path }) => {
},
});
telemetry.reportDetailsFlyoutTabClicked({
tableId: scopeId,
location: scopeId,
panel: 'left',
tabId,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const InsightsTab: React.FC = memo(() => {
},
});
telemetry.reportDetailsFlyoutTabClicked({
tableId: scopeId,
location: scopeId,
panel: 'left',
tabId: optionId,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const AlertDescription: FC = () => {
},
});
telemetry.reportDetailsFlyoutOpened({
tableId: scopeId,
location: scopeId,
panel: 'preview',
});
}, [eventId, openPreviewPanel, indexName, scopeId, ruleId, telemetry]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const Reason: FC = () => {
},
});
telemetry.reportDetailsFlyoutOpened({
tableId: scopeId,
location: scopeId,
panel: 'preview',
});
}, [eventId, openPreviewPanel, indexName, scopeId, telemetry]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const RightPanel: FC<Partial<RightPanelProps>> = memo(({ path }) => {
storage.set(FLYOUT_STORAGE_KEYS.RIGHT_PANEL_SELECTED_TABS, tabId);

telemetry.reportDetailsFlyoutTabClicked({
tableId: scopeId,
location: scopeId,
panel: 'right',
tabId,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const PanelNavigation: FC<PanelNavigationProps> = memo(({ flyoutIsExpanda
},
});
telemetry.reportDetailsFlyoutOpened({
tableId: scopeId,
location: scopeId,
panel: 'left',
});
}, [eventId, openLeftPanel, indexName, scopeId, telemetry]);
Expand Down

0 comments on commit 1cfebf8

Please sign in to comment.