Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] Siem migrations UI telemetry #209633

Merged
merged 11 commits into from
Feb 10, 2025

Conversation

semd
Copy link
Contributor

@semd semd commented Feb 4, 2025

Summary

Created a telemetry client with all SIEM migration telemetry events.
And added the calls to track them

New events

SetupConnectorSelected {
  connectorType: string;
  connectorId: string;
}

SetupMigrationOpenNew {
  isFirstMigration: boolean;
}

SetupMigrationOpenResources {
  migrationId: string;
  missingResourcesCount: number;
}

SetupRulesQueryCopied {
  migrationId?: string;
}

SetupMigrationCreated {
  migrationId?: string;
  rulesCount: number;
  result: 'success' | 'failed';
  errorMessage?: string;
}

SetupMacrosQueryCopied {
  migrationId: string;
}

SetupLookupNameCopied {
  migrationId: string;
}

SetupResourcesUploaded {
  migrationId: string;
  type: 'macro' | 'lookup';
  count: number;
  result: 'success' | 'failed';
  errorMessage?: string;
}

StartTranslation {
  migrationId: string;
  connectorId: string;
  isRetry: boolean;
  retryFilter?: 'failed' | 'not_fully_translated';
  result: 'success' | 'failed';
  errorMessage?: string;
}

Existing events (Translated rules actions):

Also integrated into the telemetry client

TranslatedRuleUpdate {
  migrationId: string;
  ruleMigrationId: string;
}

TranslatedRuleInstall {
  migrationId: string;
  ruleMigrationId: string;
  author: 'elastic' | 'custom';
  enabled: boolean;
  prebuiltRule?: {
    id: string;
    title: string;
  };
}

TranslatedRuleBulkInstall {
  migrationId: string;
  enabled: boolean;
  count: number;
}

@semd semd changed the title Siem migrations/telemetry onboarding page [Security Solution] Siem migrations UI telemetry Feb 6, 2025
@semd semd self-assigned this Feb 7, 2025
@semd semd added v9.0.0 Team:Threat Hunting Security Solution Threat Hunting Team backport:version Backport to applied version labels v8.18.0 v9.1.0 v8.19.0 release_note:skip Skip the PR/issue when compiling release notes labels Feb 7, 2025
@semd semd marked this pull request as ready for review February 7, 2025 12:57
@semd semd requested review from a team as code owners February 7, 2025 12:57
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@@ -15,6 +15,7 @@ import { manualRuleRunTelemetryEvents } from './manual_rule_run';
import { notesTelemetryEvents } from './notes';
import { onboardingHubTelemetryEvents } from './onboarding';
import { previewRuleTelemetryEvents } from './preview_rule';
import { siemMigrationsTelemetryEvents } from './siem_migrations';

export const telemetryEvents = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an aside, just realized we have no way of identifying if we have naming collisions in the telemetry event types. It shouldn't really ever happen since the naming is pretty well isolated, but in the future may be worth adding some check for that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the test here 671771f

}
this.telemetry.reportSetupMigrationCreated({ migrationId, rulesCount });
return migrationId as string;
} catch (error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just confirming you want the batch processing to stop in the event of an error, rather than just moving on to the next batch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think that's fine for now. Since the migrationId is passed back to the API once the first batch is created, I decided it's better to stop if there's an error, to avoid creating multiple migrations if something goes wrong.
We can improve this error handling later though.

this.telemetryService.reportEvent(SiemMigrationsEventTypes.TranslatedRuleInstall, {
migrationId: ruleMigration.migration_id,
ruleMigrationId: ruleMigration.id,
author: elasticRule?.prebuilt_rule_id ? 'elastic' : 'custom',
Copy link
Contributor

@michaelolo24 michaelolo24 Feb 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, consider raising the logic here out of reportEvent

const prebuiltRuleConfig = { author: 'elastic' };
if (elasticRule?.prebuilt_rule_id) {
 prebuiltRuleConfig.author = 'custom';
 prebuiltRuleConfig.prebuiltRule = { id: elasticRule.prebuilt_rule_id, title: elasticRule.title };
 }
 ...
 {
   ...prebuiltRuleConfig
 }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done here 671771f

Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the telemetry!

@elasticmachine
Copy link
Contributor

elasticmachine commented Feb 10, 2025

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 6695 6696 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 21.4MB 21.4MB +3.1KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 88.7KB 92.3KB +3.6KB

History

cc @semd

@semd semd merged commit bcc5389 into elastic:main Feb 10, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.x, 9.0

https://github.com/elastic/kibana/actions/runs/13244014330

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 10, 2025
## Summary

Created a telemetry client with all SIEM migration telemetry events.
And added the calls to track them

### New events

```ts
SetupConnectorSelected {
  connectorType: string;
  connectorId: string;
}

SetupMigrationOpenNew {
  isFirstMigration: boolean;
}

SetupMigrationOpenResources {
  migrationId: string;
  missingResourcesCount: number;
}

SetupRulesQueryCopied {
  migrationId?: string;
}

SetupMigrationCreated {
  migrationId?: string;
  rulesCount: number;
  result: 'success' | 'failed';
  errorMessage?: string;
}

SetupMacrosQueryCopied {
  migrationId: string;
}

SetupLookupNameCopied {
  migrationId: string;
}

SetupResourcesUploaded {
  migrationId: string;
  type: 'macro' | 'lookup';
  count: number;
  result: 'success' | 'failed';
  errorMessage?: string;
}

StartTranslation {
  migrationId: string;
  connectorId: string;
  isRetry: boolean;
  retryFilter?: 'failed' | 'not_fully_translated';
  result: 'success' | 'failed';
  errorMessage?: string;
}
```

### Existing events (Translated rules actions):

Also integrated into the telemetry client

```ts
TranslatedRuleUpdate {
  migrationId: string;
  ruleMigrationId: string;
}

TranslatedRuleInstall {
  migrationId: string;
  ruleMigrationId: string;
  author: 'elastic' | 'custom';
  enabled: boolean;
  prebuiltRule?: {
    id: string;
    title: string;
  };
}

TranslatedRuleBulkInstall {
  migrationId: string;
  enabled: boolean;
  count: number;
}
```

(cherry picked from commit bcc5389)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 10, 2025
## Summary

Created a telemetry client with all SIEM migration telemetry events.
And added the calls to track them

### New events

```ts
SetupConnectorSelected {
  connectorType: string;
  connectorId: string;
}

SetupMigrationOpenNew {
  isFirstMigration: boolean;
}

SetupMigrationOpenResources {
  migrationId: string;
  missingResourcesCount: number;
}

SetupRulesQueryCopied {
  migrationId?: string;
}

SetupMigrationCreated {
  migrationId?: string;
  rulesCount: number;
  result: 'success' | 'failed';
  errorMessage?: string;
}

SetupMacrosQueryCopied {
  migrationId: string;
}

SetupLookupNameCopied {
  migrationId: string;
}

SetupResourcesUploaded {
  migrationId: string;
  type: 'macro' | 'lookup';
  count: number;
  result: 'success' | 'failed';
  errorMessage?: string;
}

StartTranslation {
  migrationId: string;
  connectorId: string;
  isRetry: boolean;
  retryFilter?: 'failed' | 'not_fully_translated';
  result: 'success' | 'failed';
  errorMessage?: string;
}
```

### Existing events (Translated rules actions):

Also integrated into the telemetry client

```ts
TranslatedRuleUpdate {
  migrationId: string;
  ruleMigrationId: string;
}

TranslatedRuleInstall {
  migrationId: string;
  ruleMigrationId: string;
  author: 'elastic' | 'custom';
  enabled: boolean;
  prebuiltRule?: {
    id: string;
    title: string;
  };
}

TranslatedRuleBulkInstall {
  migrationId: string;
  enabled: boolean;
  count: number;
}
```

(cherry picked from commit bcc5389)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 10, 2025
## Summary

Created a telemetry client with all SIEM migration telemetry events.
And added the calls to track them

### New events

```ts
SetupConnectorSelected {
  connectorType: string;
  connectorId: string;
}

SetupMigrationOpenNew {
  isFirstMigration: boolean;
}

SetupMigrationOpenResources {
  migrationId: string;
  missingResourcesCount: number;
}

SetupRulesQueryCopied {
  migrationId?: string;
}

SetupMigrationCreated {
  migrationId?: string;
  rulesCount: number;
  result: 'success' | 'failed';
  errorMessage?: string;
}

SetupMacrosQueryCopied {
  migrationId: string;
}

SetupLookupNameCopied {
  migrationId: string;
}

SetupResourcesUploaded {
  migrationId: string;
  type: 'macro' | 'lookup';
  count: number;
  result: 'success' | 'failed';
  errorMessage?: string;
}

StartTranslation {
  migrationId: string;
  connectorId: string;
  isRetry: boolean;
  retryFilter?: 'failed' | 'not_fully_translated';
  result: 'success' | 'failed';
  errorMessage?: string;
}
```

### Existing events (Translated rules actions):

Also integrated into the telemetry client

```ts
TranslatedRuleUpdate {
  migrationId: string;
  ruleMigrationId: string;
}

TranslatedRuleInstall {
  migrationId: string;
  ruleMigrationId: string;
  author: 'elastic' | 'custom';
  enabled: boolean;
  prebuiltRule?: {
    id: string;
    title: string;
  };
}

TranslatedRuleBulkInstall {
  migrationId: string;
  enabled: boolean;
  count: number;
}
```

(cherry picked from commit bcc5389)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.18
8.x
9.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 10, 2025
…0403)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] Siem migrations UI telemetry
(#209633)](#209633)

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

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

<!--BACKPORT [{"author":{"name":"Sergi
Massaneda","email":"sergi.massaneda@elastic.co"},"sourceCommit":{"committedDate":"2025-02-10T15:10:38Z","message":"[Security
Solution] Siem migrations UI telemetry (#209633)\n\n##
Summary\r\n\r\nCreated a telemetry client with all SIEM migration
telemetry events. \r\nAnd added the calls to track them \r\n\r\n### New
events\r\n\r\n```ts\r\nSetupConnectorSelected {\r\n connectorType:
string;\r\n connectorId: string;\r\n}\r\n\r\nSetupMigrationOpenNew {\r\n
isFirstMigration: boolean;\r\n}\r\n\r\nSetupMigrationOpenResources {\r\n
migrationId: string;\r\n missingResourcesCount:
number;\r\n}\r\n\r\nSetupRulesQueryCopied {\r\n migrationId?:
string;\r\n}\r\n\r\nSetupMigrationCreated {\r\n migrationId?:
string;\r\n rulesCount: number;\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n\r\nSetupMacrosQueryCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupLookupNameCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupResourcesUploaded {\r\n
migrationId: string;\r\n type: 'macro' | 'lookup';\r\n count:
number;\r\n result: 'success' | 'failed';\r\n errorMessage?:
string;\r\n}\r\n\r\nStartTranslation {\r\n migrationId: string;\r\n
connectorId: string;\r\n isRetry: boolean;\r\n retryFilter?: 'failed' |
'not_fully_translated';\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n```\r\n\r\n### Existing events
(Translated rules actions):\r\n\r\nAlso integrated into the telemetry
client\r\n\r\n```ts\r\nTranslatedRuleUpdate {\r\n migrationId:
string;\r\n ruleMigrationId: string;\r\n}\r\n\r\nTranslatedRuleInstall
{\r\n migrationId: string;\r\n ruleMigrationId: string;\r\n author:
'elastic' | 'custom';\r\n enabled: boolean;\r\n prebuiltRule?: {\r\n id:
string;\r\n title: string;\r\n };\r\n}\r\n\r\nTranslatedRuleBulkInstall
{\r\n migrationId: string;\r\n enabled: boolean;\r\n count:
number;\r\n}\r\n```","sha":"bcc5389598b9ef23b15465715a952e6b2aca3180","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Security
Solution] Siem migrations UI
telemetry","number":209633,"url":"https://github.com/elastic/kibana/pull/209633","mergeCommit":{"message":"[Security
Solution] Siem migrations UI telemetry (#209633)\n\n##
Summary\r\n\r\nCreated a telemetry client with all SIEM migration
telemetry events. \r\nAnd added the calls to track them \r\n\r\n### New
events\r\n\r\n```ts\r\nSetupConnectorSelected {\r\n connectorType:
string;\r\n connectorId: string;\r\n}\r\n\r\nSetupMigrationOpenNew {\r\n
isFirstMigration: boolean;\r\n}\r\n\r\nSetupMigrationOpenResources {\r\n
migrationId: string;\r\n missingResourcesCount:
number;\r\n}\r\n\r\nSetupRulesQueryCopied {\r\n migrationId?:
string;\r\n}\r\n\r\nSetupMigrationCreated {\r\n migrationId?:
string;\r\n rulesCount: number;\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n\r\nSetupMacrosQueryCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupLookupNameCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupResourcesUploaded {\r\n
migrationId: string;\r\n type: 'macro' | 'lookup';\r\n count:
number;\r\n result: 'success' | 'failed';\r\n errorMessage?:
string;\r\n}\r\n\r\nStartTranslation {\r\n migrationId: string;\r\n
connectorId: string;\r\n isRetry: boolean;\r\n retryFilter?: 'failed' |
'not_fully_translated';\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n```\r\n\r\n### Existing events
(Translated rules actions):\r\n\r\nAlso integrated into the telemetry
client\r\n\r\n```ts\r\nTranslatedRuleUpdate {\r\n migrationId:
string;\r\n ruleMigrationId: string;\r\n}\r\n\r\nTranslatedRuleInstall
{\r\n migrationId: string;\r\n ruleMigrationId: string;\r\n author:
'elastic' | 'custom';\r\n enabled: boolean;\r\n prebuiltRule?: {\r\n id:
string;\r\n title: string;\r\n };\r\n}\r\n\r\nTranslatedRuleBulkInstall
{\r\n migrationId: string;\r\n enabled: boolean;\r\n count:
number;\r\n}\r\n```","sha":"bcc5389598b9ef23b15465715a952e6b2aca3180"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209633","number":209633,"mergeCommit":{"message":"[Security
Solution] Siem migrations UI telemetry (#209633)\n\n##
Summary\r\n\r\nCreated a telemetry client with all SIEM migration
telemetry events. \r\nAnd added the calls to track them \r\n\r\n### New
events\r\n\r\n```ts\r\nSetupConnectorSelected {\r\n connectorType:
string;\r\n connectorId: string;\r\n}\r\n\r\nSetupMigrationOpenNew {\r\n
isFirstMigration: boolean;\r\n}\r\n\r\nSetupMigrationOpenResources {\r\n
migrationId: string;\r\n missingResourcesCount:
number;\r\n}\r\n\r\nSetupRulesQueryCopied {\r\n migrationId?:
string;\r\n}\r\n\r\nSetupMigrationCreated {\r\n migrationId?:
string;\r\n rulesCount: number;\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n\r\nSetupMacrosQueryCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupLookupNameCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupResourcesUploaded {\r\n
migrationId: string;\r\n type: 'macro' | 'lookup';\r\n count:
number;\r\n result: 'success' | 'failed';\r\n errorMessage?:
string;\r\n}\r\n\r\nStartTranslation {\r\n migrationId: string;\r\n
connectorId: string;\r\n isRetry: boolean;\r\n retryFilter?: 'failed' |
'not_fully_translated';\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n```\r\n\r\n### Existing events
(Translated rules actions):\r\n\r\nAlso integrated into the telemetry
client\r\n\r\n```ts\r\nTranslatedRuleUpdate {\r\n migrationId:
string;\r\n ruleMigrationId: string;\r\n}\r\n\r\nTranslatedRuleInstall
{\r\n migrationId: string;\r\n ruleMigrationId: string;\r\n author:
'elastic' | 'custom';\r\n enabled: boolean;\r\n prebuiltRule?: {\r\n id:
string;\r\n title: string;\r\n };\r\n}\r\n\r\nTranslatedRuleBulkInstall
{\r\n migrationId: string;\r\n enabled: boolean;\r\n count:
number;\r\n}\r\n```","sha":"bcc5389598b9ef23b15465715a952e6b2aca3180"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
kibanamachine added a commit that referenced this pull request Feb 10, 2025
…10402)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Security Solution] Siem migrations UI telemetry
(#209633)](#209633)

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

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

<!--BACKPORT [{"author":{"name":"Sergi
Massaneda","email":"sergi.massaneda@elastic.co"},"sourceCommit":{"committedDate":"2025-02-10T15:10:38Z","message":"[Security
Solution] Siem migrations UI telemetry (#209633)\n\n##
Summary\r\n\r\nCreated a telemetry client with all SIEM migration
telemetry events. \r\nAnd added the calls to track them \r\n\r\n### New
events\r\n\r\n```ts\r\nSetupConnectorSelected {\r\n connectorType:
string;\r\n connectorId: string;\r\n}\r\n\r\nSetupMigrationOpenNew {\r\n
isFirstMigration: boolean;\r\n}\r\n\r\nSetupMigrationOpenResources {\r\n
migrationId: string;\r\n missingResourcesCount:
number;\r\n}\r\n\r\nSetupRulesQueryCopied {\r\n migrationId?:
string;\r\n}\r\n\r\nSetupMigrationCreated {\r\n migrationId?:
string;\r\n rulesCount: number;\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n\r\nSetupMacrosQueryCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupLookupNameCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupResourcesUploaded {\r\n
migrationId: string;\r\n type: 'macro' | 'lookup';\r\n count:
number;\r\n result: 'success' | 'failed';\r\n errorMessage?:
string;\r\n}\r\n\r\nStartTranslation {\r\n migrationId: string;\r\n
connectorId: string;\r\n isRetry: boolean;\r\n retryFilter?: 'failed' |
'not_fully_translated';\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n```\r\n\r\n### Existing events
(Translated rules actions):\r\n\r\nAlso integrated into the telemetry
client\r\n\r\n```ts\r\nTranslatedRuleUpdate {\r\n migrationId:
string;\r\n ruleMigrationId: string;\r\n}\r\n\r\nTranslatedRuleInstall
{\r\n migrationId: string;\r\n ruleMigrationId: string;\r\n author:
'elastic' | 'custom';\r\n enabled: boolean;\r\n prebuiltRule?: {\r\n id:
string;\r\n title: string;\r\n };\r\n}\r\n\r\nTranslatedRuleBulkInstall
{\r\n migrationId: string;\r\n enabled: boolean;\r\n count:
number;\r\n}\r\n```","sha":"bcc5389598b9ef23b15465715a952e6b2aca3180","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Security
Solution] Siem migrations UI
telemetry","number":209633,"url":"https://github.com/elastic/kibana/pull/209633","mergeCommit":{"message":"[Security
Solution] Siem migrations UI telemetry (#209633)\n\n##
Summary\r\n\r\nCreated a telemetry client with all SIEM migration
telemetry events. \r\nAnd added the calls to track them \r\n\r\n### New
events\r\n\r\n```ts\r\nSetupConnectorSelected {\r\n connectorType:
string;\r\n connectorId: string;\r\n}\r\n\r\nSetupMigrationOpenNew {\r\n
isFirstMigration: boolean;\r\n}\r\n\r\nSetupMigrationOpenResources {\r\n
migrationId: string;\r\n missingResourcesCount:
number;\r\n}\r\n\r\nSetupRulesQueryCopied {\r\n migrationId?:
string;\r\n}\r\n\r\nSetupMigrationCreated {\r\n migrationId?:
string;\r\n rulesCount: number;\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n\r\nSetupMacrosQueryCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupLookupNameCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupResourcesUploaded {\r\n
migrationId: string;\r\n type: 'macro' | 'lookup';\r\n count:
number;\r\n result: 'success' | 'failed';\r\n errorMessage?:
string;\r\n}\r\n\r\nStartTranslation {\r\n migrationId: string;\r\n
connectorId: string;\r\n isRetry: boolean;\r\n retryFilter?: 'failed' |
'not_fully_translated';\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n```\r\n\r\n### Existing events
(Translated rules actions):\r\n\r\nAlso integrated into the telemetry
client\r\n\r\n```ts\r\nTranslatedRuleUpdate {\r\n migrationId:
string;\r\n ruleMigrationId: string;\r\n}\r\n\r\nTranslatedRuleInstall
{\r\n migrationId: string;\r\n ruleMigrationId: string;\r\n author:
'elastic' | 'custom';\r\n enabled: boolean;\r\n prebuiltRule?: {\r\n id:
string;\r\n title: string;\r\n };\r\n}\r\n\r\nTranslatedRuleBulkInstall
{\r\n migrationId: string;\r\n enabled: boolean;\r\n count:
number;\r\n}\r\n```","sha":"bcc5389598b9ef23b15465715a952e6b2aca3180"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209633","number":209633,"mergeCommit":{"message":"[Security
Solution] Siem migrations UI telemetry (#209633)\n\n##
Summary\r\n\r\nCreated a telemetry client with all SIEM migration
telemetry events. \r\nAnd added the calls to track them \r\n\r\n### New
events\r\n\r\n```ts\r\nSetupConnectorSelected {\r\n connectorType:
string;\r\n connectorId: string;\r\n}\r\n\r\nSetupMigrationOpenNew {\r\n
isFirstMigration: boolean;\r\n}\r\n\r\nSetupMigrationOpenResources {\r\n
migrationId: string;\r\n missingResourcesCount:
number;\r\n}\r\n\r\nSetupRulesQueryCopied {\r\n migrationId?:
string;\r\n}\r\n\r\nSetupMigrationCreated {\r\n migrationId?:
string;\r\n rulesCount: number;\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n\r\nSetupMacrosQueryCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupLookupNameCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupResourcesUploaded {\r\n
migrationId: string;\r\n type: 'macro' | 'lookup';\r\n count:
number;\r\n result: 'success' | 'failed';\r\n errorMessage?:
string;\r\n}\r\n\r\nStartTranslation {\r\n migrationId: string;\r\n
connectorId: string;\r\n isRetry: boolean;\r\n retryFilter?: 'failed' |
'not_fully_translated';\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n```\r\n\r\n### Existing events
(Translated rules actions):\r\n\r\nAlso integrated into the telemetry
client\r\n\r\n```ts\r\nTranslatedRuleUpdate {\r\n migrationId:
string;\r\n ruleMigrationId: string;\r\n}\r\n\r\nTranslatedRuleInstall
{\r\n migrationId: string;\r\n ruleMigrationId: string;\r\n author:
'elastic' | 'custom';\r\n enabled: boolean;\r\n prebuiltRule?: {\r\n id:
string;\r\n title: string;\r\n };\r\n}\r\n\r\nTranslatedRuleBulkInstall
{\r\n migrationId: string;\r\n enabled: boolean;\r\n count:
number;\r\n}\r\n```","sha":"bcc5389598b9ef23b15465715a952e6b2aca3180"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
kibanamachine added a commit that referenced this pull request Feb 10, 2025
…0404)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Security Solution] Siem migrations UI telemetry
(#209633)](#209633)

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

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

<!--BACKPORT [{"author":{"name":"Sergi
Massaneda","email":"sergi.massaneda@elastic.co"},"sourceCommit":{"committedDate":"2025-02-10T15:10:38Z","message":"[Security
Solution] Siem migrations UI telemetry (#209633)\n\n##
Summary\r\n\r\nCreated a telemetry client with all SIEM migration
telemetry events. \r\nAnd added the calls to track them \r\n\r\n### New
events\r\n\r\n```ts\r\nSetupConnectorSelected {\r\n connectorType:
string;\r\n connectorId: string;\r\n}\r\n\r\nSetupMigrationOpenNew {\r\n
isFirstMigration: boolean;\r\n}\r\n\r\nSetupMigrationOpenResources {\r\n
migrationId: string;\r\n missingResourcesCount:
number;\r\n}\r\n\r\nSetupRulesQueryCopied {\r\n migrationId?:
string;\r\n}\r\n\r\nSetupMigrationCreated {\r\n migrationId?:
string;\r\n rulesCount: number;\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n\r\nSetupMacrosQueryCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupLookupNameCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupResourcesUploaded {\r\n
migrationId: string;\r\n type: 'macro' | 'lookup';\r\n count:
number;\r\n result: 'success' | 'failed';\r\n errorMessage?:
string;\r\n}\r\n\r\nStartTranslation {\r\n migrationId: string;\r\n
connectorId: string;\r\n isRetry: boolean;\r\n retryFilter?: 'failed' |
'not_fully_translated';\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n```\r\n\r\n### Existing events
(Translated rules actions):\r\n\r\nAlso integrated into the telemetry
client\r\n\r\n```ts\r\nTranslatedRuleUpdate {\r\n migrationId:
string;\r\n ruleMigrationId: string;\r\n}\r\n\r\nTranslatedRuleInstall
{\r\n migrationId: string;\r\n ruleMigrationId: string;\r\n author:
'elastic' | 'custom';\r\n enabled: boolean;\r\n prebuiltRule?: {\r\n id:
string;\r\n title: string;\r\n };\r\n}\r\n\r\nTranslatedRuleBulkInstall
{\r\n migrationId: string;\r\n enabled: boolean;\r\n count:
number;\r\n}\r\n```","sha":"bcc5389598b9ef23b15465715a952e6b2aca3180","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Security
Solution] Siem migrations UI
telemetry","number":209633,"url":"https://github.com/elastic/kibana/pull/209633","mergeCommit":{"message":"[Security
Solution] Siem migrations UI telemetry (#209633)\n\n##
Summary\r\n\r\nCreated a telemetry client with all SIEM migration
telemetry events. \r\nAnd added the calls to track them \r\n\r\n### New
events\r\n\r\n```ts\r\nSetupConnectorSelected {\r\n connectorType:
string;\r\n connectorId: string;\r\n}\r\n\r\nSetupMigrationOpenNew {\r\n
isFirstMigration: boolean;\r\n}\r\n\r\nSetupMigrationOpenResources {\r\n
migrationId: string;\r\n missingResourcesCount:
number;\r\n}\r\n\r\nSetupRulesQueryCopied {\r\n migrationId?:
string;\r\n}\r\n\r\nSetupMigrationCreated {\r\n migrationId?:
string;\r\n rulesCount: number;\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n\r\nSetupMacrosQueryCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupLookupNameCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupResourcesUploaded {\r\n
migrationId: string;\r\n type: 'macro' | 'lookup';\r\n count:
number;\r\n result: 'success' | 'failed';\r\n errorMessage?:
string;\r\n}\r\n\r\nStartTranslation {\r\n migrationId: string;\r\n
connectorId: string;\r\n isRetry: boolean;\r\n retryFilter?: 'failed' |
'not_fully_translated';\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n```\r\n\r\n### Existing events
(Translated rules actions):\r\n\r\nAlso integrated into the telemetry
client\r\n\r\n```ts\r\nTranslatedRuleUpdate {\r\n migrationId:
string;\r\n ruleMigrationId: string;\r\n}\r\n\r\nTranslatedRuleInstall
{\r\n migrationId: string;\r\n ruleMigrationId: string;\r\n author:
'elastic' | 'custom';\r\n enabled: boolean;\r\n prebuiltRule?: {\r\n id:
string;\r\n title: string;\r\n };\r\n}\r\n\r\nTranslatedRuleBulkInstall
{\r\n migrationId: string;\r\n enabled: boolean;\r\n count:
number;\r\n}\r\n```","sha":"bcc5389598b9ef23b15465715a952e6b2aca3180"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209633","number":209633,"mergeCommit":{"message":"[Security
Solution] Siem migrations UI telemetry (#209633)\n\n##
Summary\r\n\r\nCreated a telemetry client with all SIEM migration
telemetry events. \r\nAnd added the calls to track them \r\n\r\n### New
events\r\n\r\n```ts\r\nSetupConnectorSelected {\r\n connectorType:
string;\r\n connectorId: string;\r\n}\r\n\r\nSetupMigrationOpenNew {\r\n
isFirstMigration: boolean;\r\n}\r\n\r\nSetupMigrationOpenResources {\r\n
migrationId: string;\r\n missingResourcesCount:
number;\r\n}\r\n\r\nSetupRulesQueryCopied {\r\n migrationId?:
string;\r\n}\r\n\r\nSetupMigrationCreated {\r\n migrationId?:
string;\r\n rulesCount: number;\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n\r\nSetupMacrosQueryCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupLookupNameCopied {\r\n
migrationId: string;\r\n}\r\n\r\nSetupResourcesUploaded {\r\n
migrationId: string;\r\n type: 'macro' | 'lookup';\r\n count:
number;\r\n result: 'success' | 'failed';\r\n errorMessage?:
string;\r\n}\r\n\r\nStartTranslation {\r\n migrationId: string;\r\n
connectorId: string;\r\n isRetry: boolean;\r\n retryFilter?: 'failed' |
'not_fully_translated';\r\n result: 'success' | 'failed';\r\n
errorMessage?: string;\r\n}\r\n```\r\n\r\n### Existing events
(Translated rules actions):\r\n\r\nAlso integrated into the telemetry
client\r\n\r\n```ts\r\nTranslatedRuleUpdate {\r\n migrationId:
string;\r\n ruleMigrationId: string;\r\n}\r\n\r\nTranslatedRuleInstall
{\r\n migrationId: string;\r\n ruleMigrationId: string;\r\n author:
'elastic' | 'custom';\r\n enabled: boolean;\r\n prebuiltRule?: {\r\n id:
string;\r\n title: string;\r\n };\r\n}\r\n\r\nTranslatedRuleBulkInstall
{\r\n migrationId: string;\r\n enabled: boolean;\r\n count:
number;\r\n}\r\n```","sha":"bcc5389598b9ef23b15465715a952e6b2aca3180"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting Security Solution Threat Hunting Team v8.18.0 v8.19.0 v9.0.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants