-
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
[ES Query] Save ECS keyword group by fields in AAD document #191103
[ES Query] Save ECS keyword group by fields in AAD document #191103
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
/oblt-deploy |
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! I tested locally and works as expected
@@ -178,6 +180,15 @@ export async function executor(core: CoreSetup, options: ExecutorOptions<EsQuery | |||
}); | |||
|
|||
const id = alertId === UngroupedGroupId && !isGroupAgg ? ConditionMetAlertInstanceId : alertId; | |||
const instances = alertId.split(','); |
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.
This code seems very dependent on string parsing of potential user data. What happens if one if the met terms includes ,
? Feels like we should be using the values returned by the agg, instead of (I guess) parsing the result of us joining the values. Maybe this is something new we need to start returning that we aren't today?
The test for alertId !== UngroupedGroupId
also seems a little sketchy, since an alertId could be UngroupedGroupId
. Seems like this code would work fine today, but is unneeded, and could potentially cause problems in the future. Seems like you can just remove the alertId !== UngroupedGroupId
check completely.
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.
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Public APIs missing comments
Page load bundle
History
To update your PR or re-run it, just comment with: |
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.
Tested the new changes locally, LGTM
Related to #183220
Summary
This PR saves ECS keyword group by fields in AAD document for ES query rule.
How to test
node scripts/synthtrace simple_trace.ts --local --live