-
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] Knowledge base entry telemetry #199225
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
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.
Thanks for adding telemetries, LGTM!! Left a few questions regarding bulk actions.
@@ -82,6 +84,16 @@ const buildBulkResponse = ( | |||
skipped, | |||
}; | |||
|
|||
if (created.length) { | |||
created.forEach((entry) => { |
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.
Should this be done after the successful bulk create entry
operation? Just wondering if we partially created entries and some of them failed, in this case we still will report that all of them were created in telemetry?
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.
buildBulkResponse
is called after the request has already been completed, so only created
entries exist 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.
ohh, I missed that this is inside buildBulkResponse
:-)
response, | ||
{ | ||
// @ts-ignore-next-line TS2322 | ||
updated: transformESToKnowledgeBase(docsUpdated), |
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.
Maybe we could also add telemetry for update
and delete
operations.
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.
Also, would be nice to report errors during the bulk
call.
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.
Do we have a separate task for these operations?
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.
It seems we're not interested in update
or delete
, I asked Pedro and was told that wasn't important to track
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
History
|
Starting backport for target branches: 8.16, 8.x |
(cherry picked from commit 1127bf4)
(cherry picked from commit 1127bf4)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…199723) # Backport This will backport the following commits from `main` to `8.16`: - [[Security solution] Knowledge base entry telemetry (#199225)](#199225) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Steph Milovic","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-12T00:10:07Z","message":"[Security solution] Knowledge base entry telemetry (#199225)","sha":"1127bf491d78b7ce2319a13257dbf0b1e84226e8","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["WIP","release_note:skip","v9.0.0","Team: SecuritySolution","Team:Security Generative AI","backport:version","v8.17.0","v8.16.1"],"title":"[Security solution] Knowledge base entry telemetry","number":199225,"url":"https://github.com/elastic/kibana/pull/199225","mergeCommit":{"message":"[Security solution] Knowledge base entry telemetry (#199225)","sha":"1127bf491d78b7ce2319a13257dbf0b1e84226e8"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199225","number":199225,"mergeCommit":{"message":"[Security solution] Knowledge base entry telemetry (#199225)","sha":"1127bf491d78b7ce2319a13257dbf0b1e84226e8"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Steph Milovic <[email protected]>
…199724) # Backport This will backport the following commits from `main` to `8.x`: - [[Security solution] Knowledge base entry telemetry (#199225)](#199225) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Steph Milovic","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-12T00:10:07Z","message":"[Security solution] Knowledge base entry telemetry (#199225)","sha":"1127bf491d78b7ce2319a13257dbf0b1e84226e8","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["WIP","release_note:skip","v9.0.0","Team: SecuritySolution","Team:Security Generative AI","backport:version","v8.17.0","v8.16.1"],"title":"[Security solution] Knowledge base entry telemetry","number":199225,"url":"https://github.com/elastic/kibana/pull/199225","mergeCommit":{"message":"[Security solution] Knowledge base entry telemetry (#199225)","sha":"1127bf491d78b7ce2319a13257dbf0b1e84226e8"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199225","number":199225,"mergeCommit":{"message":"[Security solution] Knowledge base entry telemetry (#199225)","sha":"1127bf491d78b7ce2319a13257dbf0b1e84226e8"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Steph Milovic <[email protected]>
Summary
Adds 2 new events for tracking knowledge base entry creation:
Updates the
INVOKE_ASSISTANT_SUCCESS
event to track request duration, tools invoked, and optionallyisOssModel
:Allows the addition of 2 new charts to GenAI Dashboard
Moved
INVOKE_ASSISTANT_SUCCESS
eventMoved the
INVOKE_ASSISTANT_SUCCESS
to be reported from the LangChain tracers in order to get information about the run.