Skip to content

Commit ab319c0

Browse files
kibanamachineashokadityapaul-tavares
authored
[8.19] [SecuritySolution][Endpoint][ResponseActions] Enable response actions telemetry (elastic#225233) (elastic#225603)
# Backport This will backport the following commits from `main` to `8.19`: - [[SecuritySolution][Endpoint][ResponseActions] Enable response actions telemetry (elastic#225233)](elastic#225233) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ash","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-06-27T09:56:10Z","message":"[SecuritySolution][Endpoint][ResponseActions] Enable response actions telemetry (elastic#225233)\n\n## Summary\n\nEnables feature flag to collect response actions telemetry\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: Paul Tavares <[email protected]>","sha":"1c316c13866c7b41d4e3f44349b44c46a111e09d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Defend Workflows","OLM Sprint","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[SecuritySolution][Endpoint][ResponseActions] Enable response actions telemetry","number":225233,"url":"https://github.com/elastic/kibana/pull/225233","mergeCommit":{"message":"[SecuritySolution][Endpoint][ResponseActions] Enable response actions telemetry (elastic#225233)\n\n## Summary\n\nEnables feature flag to collect response actions telemetry\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: Paul Tavares <[email protected]>","sha":"1c316c13866c7b41d4e3f44349b44c46a111e09d"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225233","number":225233,"mergeCommit":{"message":"[SecuritySolution][Endpoint][ResponseActions] Enable response actions telemetry (elastic#225233)\n\n## Summary\n\nEnables feature flag to collect response actions telemetry\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: Paul Tavares <[email protected]>","sha":"1c316c13866c7b41d4e3f44349b44c46a111e09d"}}]}] BACKPORT--> Co-authored-by: Ash <[email protected]> Co-authored-by: Paul Tavares <[email protected]>
1 parent d1aa222 commit ab319c0

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export const allowedExperimentalValues = Object.freeze({
166166
* Enables Response actions telemetry collection
167167
* Should be enabled in 8.17.0
168168
*/
169-
responseActionsTelemetryEnabled: false,
169+
responseActionsTelemetryEnabled: true,
170170

171171
/**
172172
* Enables experimental JAMF integration data to be available in Analyzer

x-pack/solutions/security/plugins/security_solution/server/endpoint/mocks/mocks.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export const createMockEndpointAppContextService = (
120120
const featureUsageMock = createFeatureUsageServiceMock();
121121
const messageSigningService = createMessageSigningServiceMock();
122122
const licenseServiceMock = createLicenseServiceMock();
123+
const telemetryServiceMock = analyticsServiceMock.createAnalyticsServiceSetup();
123124

124125
return {
125126
start: jest.fn(),
@@ -141,7 +142,7 @@ export const createMockEndpointAppContextService = (
141142
getExceptionListsClient: jest.fn(),
142143
getMessageSigningService: jest.fn().mockReturnValue(messageSigningService),
143144
getFleetActionsClient: jest.fn(async (_) => fleetActionsClientMock),
144-
getTelemetryService: jest.fn(),
145+
getTelemetryService: jest.fn().mockReturnValue(telemetryServiceMock),
145146
getInternalResponseActionsClient: jest.fn(() => {
146147
return responseActionsClientMock.create();
147148
}),

x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/lib/base_response_actions_client.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,11 +532,6 @@ describe('ResponseActionsClientImpl base class', () => {
532532
});
533533

534534
describe('Telemetry', () => {
535-
beforeEach(() => {
536-
// @ts-expect-error
537-
endpointAppContextService.experimentalFeatures.responseActionsTelemetryEnabled = true;
538-
});
539-
540535
it('should send action creation success telemetry for manual actions', async () => {
541536
await baseClassMock.writeActionRequestToEndpointIndex(indexDocOptions);
542537

x-pack/solutions/security/plugins/security_solution/server/endpoint/services/actions/clients/sentinelone/sentinel_one_actions_client.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -907,11 +907,6 @@ describe('SentinelOneActionsClient class', () => {
907907
});
908908

909909
describe('Telemetry', () => {
910-
beforeEach(() => {
911-
// @ts-expect-error
912-
classConstructorOptions.endpointService.experimentalFeatures.responseActionsTelemetryEnabled =
913-
true;
914-
});
915910
describe('for Isolate and Release', () => {
916911
let s1ActivityHits: Array<SearchHit<SentinelOneActivityEsDoc>>;
917912

0 commit comments

Comments
 (0)