[Rules] Enable versatile EBT#221163
Conversation
|
Pinging @elastic/response-ops (Team:ResponseOps) |
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
| unsnoozeRule={async (scheduleIds) => await onUnsnoozeRule(rule, scheduleIds)} | ||
| isRuleEditable={rule.isEditable} | ||
| /> | ||
| <div data-test-subj={`ruleType_${rule.ruleTypeId}`}> |
There was a problem hiding this comment.
table cell for snooze
There was a problem hiding this comment.
same here, if possible, remove the div and add the data-test-subj attribute to the RulesListNotifyBadge
There was a problem hiding this comment.
Can't we add data-test-subj={ruleType_${rule.ruleTypeId}} directly on the RulesListNotifyBadge?
There was a problem hiding this comment.
I didn't add it here because the notify badge is used by several components and also has several return statements. I would have to pass the ruleType as an optional prop then optionally add it to each of the possible return statements within the child component
There was a problem hiding this comment.
we also checked to add it to the table cell itself but couldn't see anything that would allow us setting the test-subj prop
| onRuleChanged={onRuleChanged} | ||
| isEditable={rule.isEditable && isRuleTypeEditableInContext(rule.ruleTypeId)} | ||
| /> | ||
| <div data-test-subj={`ruleType_${rule.ruleTypeId}`}> |
There was a problem hiding this comment.
table cell for enable/disable
There was a problem hiding this comment.
Why not adding the data-test-subj attribute to the RuleStatusDropdown component? It's weird to change the layout because of tracking (that's what I'm understanding the reason is for adding this).
A general question, what if we change the data-test-subj value in the future? Wouldn't that break our tracking? Would it make sense to have another attribute like data-track-subj or similar?
There was a problem hiding this comment.
I was told that attributes with the data-test-subj tag are what triggers the "automatic" telemetry data collection. If there's another, less-frequently touched attribute that achieves the same purpose, I'm open to switching over to it :)
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
|
kdelemme
left a comment
There was a problem hiding this comment.
Just a suggestion otherwise LGTM
|
Starting backport for target branches: 8.19 https://github.com/elastic/kibana/actions/runs/15613288673 |
## Summary Partially implements elastic#219986 - Collect clicks / interactions with rules objects - Determine the source of the clicks (rule details page vs table) - How often users snooze, enable, disable, run rules - This PR specifically enables the ability to determine how often these actions occur by rule type ## Query Examples ``` properties.target: "data-test-subj=snoozeButton" ``` Will give you documents that will tell you that a user clicked on the snooze button on any page ``` properties.target: "data-test-subj=snoozeButton" and "data-test-subj=collapsedActionPanel" ``` Will give you documents that will tell you that a user clicked on the snooze button on the collapsed action panel on the table INSTEAD OF the snooze button in the notify column or details page ``` properties.target: "data-test-subj=ruleType_slo.rules.burnRate" and properties.target: "data-test-subj=snoozeButton" ``` Will give you documents where SLO burn rate rules were snoozed ## Local Testing Add the following to kibana.dev.yml ``` telemetry: localShipper: true ``` Clicks will begin registering to the `ebt-kibana-browser` index with target arrays that include the new test subject values. Sample target array with the changes: [example.txt](https://github.com/user-attachments/files/20630704/example.txt) - Click location (page name) - Rule type - Button label (cherry picked from commit d17f69c)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.19`: - [[Rules] Enable versatile EBT (#221163)](#221163) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Bailey Cash","email":"bailey.cash@elastic.co"},"sourceCommit":{"committedDate":"2025-06-12T14:26:36Z","message":"[Rules] Enable versatile EBT (#221163)\n\n## Summary\nPartially implements #219986\n\n- Collect clicks / interactions with rules objects\n- Determine the source of the clicks (rule details page vs table)\n- How often users snooze, enable, disable, run rules\n- This PR specifically enables the ability to determine how often these\nactions occur by rule type\n\n## Query Examples\n\n```\nproperties.target: \"data-test-subj=snoozeButton\"\n```\nWill give you documents that will tell you that a user clicked on the\nsnooze button on any page\n\n```\nproperties.target: \"data-test-subj=snoozeButton\" and \"data-test-subj=collapsedActionPanel\"\n```\nWill give you documents that will tell you that a user clicked on the\nsnooze button on the collapsed action panel on the table INSTEAD OF the\nsnooze button in the notify column or details page\n\n```\nproperties.target: \"data-test-subj=ruleType_slo.rules.burnRate\" and properties.target: \"data-test-subj=snoozeButton\"\n```\nWill give you documents where SLO burn rate rules were snoozed\n\n## Local Testing\n\nAdd the following to kibana.dev.yml\n\n```\ntelemetry:\n localShipper: true\n```\n\nClicks will begin registering to the `ebt-kibana-browser` index with\ntarget arrays that include the new test subject values.\n\nSample target array with the changes:\n\n[example.txt](https://github.com/user-attachments/files/20630704/example.txt)\n\n- Click location (page name)\n- Rule type\n- Button label","sha":"d17f69c863684d70469e73d0549ccdad94c83748","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0","author:obs-ux-management"],"title":"[Rules] Enable versatile EBT","number":221163,"url":"https://github.com/elastic/kibana/pull/221163","mergeCommit":{"message":"[Rules] Enable versatile EBT (#221163)\n\n## Summary\nPartially implements #219986\n\n- Collect clicks / interactions with rules objects\n- Determine the source of the clicks (rule details page vs table)\n- How often users snooze, enable, disable, run rules\n- This PR specifically enables the ability to determine how often these\nactions occur by rule type\n\n## Query Examples\n\n```\nproperties.target: \"data-test-subj=snoozeButton\"\n```\nWill give you documents that will tell you that a user clicked on the\nsnooze button on any page\n\n```\nproperties.target: \"data-test-subj=snoozeButton\" and \"data-test-subj=collapsedActionPanel\"\n```\nWill give you documents that will tell you that a user clicked on the\nsnooze button on the collapsed action panel on the table INSTEAD OF the\nsnooze button in the notify column or details page\n\n```\nproperties.target: \"data-test-subj=ruleType_slo.rules.burnRate\" and properties.target: \"data-test-subj=snoozeButton\"\n```\nWill give you documents where SLO burn rate rules were snoozed\n\n## Local Testing\n\nAdd the following to kibana.dev.yml\n\n```\ntelemetry:\n localShipper: true\n```\n\nClicks will begin registering to the `ebt-kibana-browser` index with\ntarget arrays that include the new test subject values.\n\nSample target array with the changes:\n\n[example.txt](https://github.com/user-attachments/files/20630704/example.txt)\n\n- Click location (page name)\n- Rule type\n- Button label","sha":"d17f69c863684d70469e73d0549ccdad94c83748"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221163","number":221163,"mergeCommit":{"message":"[Rules] Enable versatile EBT (#221163)\n\n## Summary\nPartially implements #219986\n\n- Collect clicks / interactions with rules objects\n- Determine the source of the clicks (rule details page vs table)\n- How often users snooze, enable, disable, run rules\n- This PR specifically enables the ability to determine how often these\nactions occur by rule type\n\n## Query Examples\n\n```\nproperties.target: \"data-test-subj=snoozeButton\"\n```\nWill give you documents that will tell you that a user clicked on the\nsnooze button on any page\n\n```\nproperties.target: \"data-test-subj=snoozeButton\" and \"data-test-subj=collapsedActionPanel\"\n```\nWill give you documents that will tell you that a user clicked on the\nsnooze button on the collapsed action panel on the table INSTEAD OF the\nsnooze button in the notify column or details page\n\n```\nproperties.target: \"data-test-subj=ruleType_slo.rules.burnRate\" and properties.target: \"data-test-subj=snoozeButton\"\n```\nWill give you documents where SLO burn rate rules were snoozed\n\n## Local Testing\n\nAdd the following to kibana.dev.yml\n\n```\ntelemetry:\n localShipper: true\n```\n\nClicks will begin registering to the `ebt-kibana-browser` index with\ntarget arrays that include the new test subject values.\n\nSample target array with the changes:\n\n[example.txt](https://github.com/user-attachments/files/20630704/example.txt)\n\n- Click location (page name)\n- Rule type\n- Button label","sha":"d17f69c863684d70469e73d0549ccdad94c83748"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Bailey Cash <bailey.cash@elastic.co>
## Summary Partially implements elastic#219986 - Collect clicks / interactions with rules objects - Determine the source of the clicks (rule details page vs table) - How often users snooze, enable, disable, run rules - This PR specifically enables the ability to determine how often these actions occur by rule type ## Query Examples ``` properties.target: "data-test-subj=snoozeButton" ``` Will give you documents that will tell you that a user clicked on the snooze button on any page ``` properties.target: "data-test-subj=snoozeButton" and "data-test-subj=collapsedActionPanel" ``` Will give you documents that will tell you that a user clicked on the snooze button on the collapsed action panel on the table INSTEAD OF the snooze button in the notify column or details page ``` properties.target: "data-test-subj=ruleType_slo.rules.burnRate" and properties.target: "data-test-subj=snoozeButton" ``` Will give you documents where SLO burn rate rules were snoozed ## Local Testing Add the following to kibana.dev.yml ``` telemetry: localShipper: true ``` Clicks will begin registering to the `ebt-kibana-browser` index with target arrays that include the new test subject values. Sample target array with the changes: [example.txt](https://github.com/user-attachments/files/20630704/example.txt) - Click location (page name) - Rule type - Button label
Summary
Partially implements #219986
Query Examples
Will give you documents that will tell you that a user clicked on the snooze button on any page
Will give you documents that will tell you that a user clicked on the snooze button on the collapsed action panel on the table INSTEAD OF the snooze button in the notify column or details page
Will give you documents where SLO burn rate rules were snoozed
Local Testing
Add the following to kibana.dev.yml
Clicks will begin registering to the
ebt-kibana-browserindex with target arrays that include the new test subject values.Sample target array with the changes:
example.txt