-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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][Detection Engine] adds EBT telemetry for rule preview #194326
[Security Solution][Detection Engine] adds EBT telemetry for rule preview #194326
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
Pinging @elastic/security-detection-engine (Team:Detection Engine) |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @vitaliidm |
|
||
import { previewRule } from '../../../rule_management/api/api'; | ||
import { transformOutput } from '../../../../detections/containers/detection_engine/rules/transforms'; | ||
import type { TimeframePreviewOptions } from '../../../../detections/pages/detection_engine/rules/types'; | ||
import { usePreviewInvocationCount } from './use_preview_invocation_count'; | ||
import * as i18n from './translations'; | ||
|
||
const trackPreview = (enableLoggedRequests: boolean) => { | ||
track(METRIC_TYPE.COUNT, TELEMETRY_EVENT.PREVIEW_RULE_ALL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe using event based telemetry here can be a bit simlier.
it will be just 1 event with property for enabled logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considered it, but went first with UI counters. On the second thought - it does not look to complicated to add EBT.
So, I reimplemented it. So need another approval here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…italiidm/kibana into de_8_16/preview-rule-telemetry
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
cc @vitaliidm |
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11269960360 |
…view (elastic#194326) ## Summary - adds basic EBT telemetry for rule preview ### To test Use Discover Data View in staging to see reported events: https://telemetry-v2-staging.elastic.dev/s/securitysolution/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-28h,to:now))&_a=(columns:!(properties.ruleType,properties.loggedRequestsEnabled),filters:!(),index:security-solution-ebt-kibana-browser,interval:auto,query:(language:kuery,query:'event_type%20:%20%22Preview%20rule%22'),sort:!(!(timestamp,desc))) Note, there is a few hours delay from event reported locally to be stored on staging host (cherry picked from commit f687ce2)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…le preview (#194326) (#195710) # Backport This will backport the following commits from `main` to `8.x`: - [[Security Solution][Detection Engine] adds EBT telemetry for rule preview (#194326)](#194326) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Vitalii Dmyterko","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-10T08:06:33Z","message":"[Security Solution][Detection Engine] adds EBT telemetry for rule preview (#194326)\n\n## Summary\r\n\r\n - adds basic EBT telemetry for rule preview\r\n\r\n### To test \r\n\r\nUse Discover Data View in staging to see reported events:\r\nhttps://telemetry-v2-staging.elastic.dev/s/securitysolution/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-28h,to:now))&_a=(columns:!(properties.ruleType,properties.loggedRequestsEnabled),filters:!(),index:security-solution-ebt-kibana-browser,interval:auto,query:(language:kuery,query:'event_type%20:%20%22Preview%20rule%22'),sort:!(!(timestamp,desc)))\r\n\r\nNote, there is a few hours delay from event reported locally to be\r\nstored on staging host","sha":"f687ce2ba34a500522907b76add4327c16ad1bec","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team: SecuritySolution","backport:prev-minor","Team:Detection Engine","8.16 candidate"],"title":"[Security Solution][Detection Engine] adds EBT telemetry for rule preview","number":194326,"url":"https://github.com/elastic/kibana/pull/194326","mergeCommit":{"message":"[Security Solution][Detection Engine] adds EBT telemetry for rule preview (#194326)\n\n## Summary\r\n\r\n - adds basic EBT telemetry for rule preview\r\n\r\n### To test \r\n\r\nUse Discover Data View in staging to see reported events:\r\nhttps://telemetry-v2-staging.elastic.dev/s/securitysolution/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-28h,to:now))&_a=(columns:!(properties.ruleType,properties.loggedRequestsEnabled),filters:!(),index:security-solution-ebt-kibana-browser,interval:auto,query:(language:kuery,query:'event_type%20:%20%22Preview%20rule%22'),sort:!(!(timestamp,desc)))\r\n\r\nNote, there is a few hours delay from event reported locally to be\r\nstored on staging host","sha":"f687ce2ba34a500522907b76add4327c16ad1bec"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194326","number":194326,"mergeCommit":{"message":"[Security Solution][Detection Engine] adds EBT telemetry for rule preview (#194326)\n\n## Summary\r\n\r\n - adds basic EBT telemetry for rule preview\r\n\r\n### To test \r\n\r\nUse Discover Data View in staging to see reported events:\r\nhttps://telemetry-v2-staging.elastic.dev/s/securitysolution/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-28h,to:now))&_a=(columns:!(properties.ruleType,properties.loggedRequestsEnabled),filters:!(),index:security-solution-ebt-kibana-browser,interval:auto,query:(language:kuery,query:'event_type%20:%20%22Preview%20rule%22'),sort:!(!(timestamp,desc)))\r\n\r\nNote, there is a few hours delay from event reported locally to be\r\nstored on staging host","sha":"f687ce2ba34a500522907b76add4327c16ad1bec"}}]}] BACKPORT--> Co-authored-by: Vitalii Dmyterko <[email protected]>
Summary
To test
Use Discover Data View in staging to see reported events: https://telemetry-v2-staging.elastic.dev/s/securitysolution/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-28h,to:now))&_a=(columns:!(properties.ruleType,properties.loggedRequestsEnabled),filters:!(),index:security-solution-ebt-kibana-browser,interval:auto,query:(language:kuery,query:'event_type%20:%20%22Preview%20rule%22'),sort:!(!(timestamp,desc)))
Note, there is a few hours delay from event reported locally to be stored on staging host