Skip to content
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

[Obs AI Assistant] Improve alert context in connector #181286

Closed
2 tasks
klacabane opened this issue Apr 22, 2024 · 2 comments · Fixed by #181501
Closed
2 tasks

[Obs AI Assistant] Improve alert context in connector #181286

klacabane opened this issue Apr 22, 2024 · 2 comments · Fixed by #181501
Assignees
Labels
Team:Obs AI Assistant Team:obs-knowledge Observability Experience Knowledge team
Milestone

Comments

@klacabane
Copy link
Contributor

Summary

In #180766 we improved the context provided to the alerts insights. We should provide similar context in the alert connector and fetch any relevant data when connector is called.

Right now the data is pulled from an apm endpoint GET /internal/apm/assistant/get_apm_alert_details_context which can't be called from the connector. We should look into moving that functionality in a shared place that can be accessed by both apm and observability_ai_assistant.

Tasks

@klacabane klacabane added Team:Obs AI Assistant Team:obs-knowledge Observability Experience Knowledge team labels Apr 22, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-knowledge-team (Team:obs-knowledge)

@klacabane klacabane changed the title [Obs AI Assistant] Improve alert context [Obs AI Assistant] Improve alert context in connector Apr 22, 2024
@klacabane
Copy link
Contributor Author

Re

Fetch alert context in ai assistant connector

Discussed with @sorenlouv and we'll create a registry in observability plugin where apm (and others) can register functions, in our case getObservabilityAlertDetailsContext, so other plugins can access them. We'll keep the function defined in apm and move the route to observability

@emma-raffenne emma-raffenne added this to the 8.15 milestone Apr 23, 2024
@klacabane klacabane self-assigned this Apr 23, 2024
sorenlouv pushed a commit that referenced this issue May 1, 2024
…ugin (#181501)

## Summary
Closes #181286

Create a AlertDetailsContextService in `observability` plugin. The
service can be used by solutions to register data handler fetching
information relevant to an alert context which is then used as an input
to the ai assistant when asked to investigate an alert. While only one
handler is currently registered from apm plugin, the benefits are 1.
making this information available to the ai assistant connector since it
can't directly call apm api and 2. extending the context with additional
data in the future, for example logs.

#### Follow up
- Move apm route and associated tests to observability plugin
sorenlouv referenced this issue May 2, 2024
…lity plugin (#181501) (#182305)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[Obs AI Assistant] register alert details context in observability
plugin (#181501)](#181501)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Lacabane","email":"kevin.lacabane@elastic.co"},"sourceCommit":{"committedDate":"2024-05-01T15:50:55Z","message":"[Obs
AI Assistant] register alert details context in observability plugin
(#181501)\n\n## Summary\r\nCloses
https://github.com/elastic/kibana/issues/181286\r\n\r\nCreate a
AlertDetailsContextService in `observability` plugin. The\r\nservice can
be used by solutions to register data handler fetching\r\ninformation
relevant to an alert context which is then used as an input\r\nto the ai
assistant when asked to investigate an alert. While only one\r\nhandler
is currently registered from apm plugin, the benefits are 1.\r\nmaking
this information available to the ai assistant connector since
it\r\ncan't directly call apm api and 2. extending the context with
additional\r\ndata in the future, for example logs.\r\n\r\n#### Follow
up\r\n- Move apm route and associated tests to observability
plugin","sha":"d8831961e868587deb9e72b0c135837977ad6199","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Obs
AI
Assistant","ci:project-deploy-observability","Team:obs-knowledge","Team:obs-ux-infra_services","Team:obs-ux-management","v8.14.0","v8.15.0"],"number":181501,"url":"https://github.com/elastic/kibana/pull/181501","mergeCommit":{"message":"[Obs
AI Assistant] register alert details context in observability plugin
(#181501)\n\n## Summary\r\nCloses
https://github.com/elastic/kibana/issues/181286\r\n\r\nCreate a
AlertDetailsContextService in `observability` plugin. The\r\nservice can
be used by solutions to register data handler fetching\r\ninformation
relevant to an alert context which is then used as an input\r\nto the ai
assistant when asked to investigate an alert. While only one\r\nhandler
is currently registered from apm plugin, the benefits are 1.\r\nmaking
this information available to the ai assistant connector since
it\r\ncan't directly call apm api and 2. extending the context with
additional\r\ndata in the future, for example logs.\r\n\r\n#### Follow
up\r\n- Move apm route and associated tests to observability
plugin","sha":"d8831961e868587deb9e72b0c135837977ad6199"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","labelRegex":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/181501","number":181501,"mergeCommit":{"message":"[Obs
AI Assistant] register alert details context in observability plugin
(#181501)\n\n## Summary\r\nCloses
https://github.com/elastic/kibana/issues/181286\r\n\r\nCreate a
AlertDetailsContextService in `observability` plugin. The\r\nservice can
be used by solutions to register data handler fetching\r\ninformation
relevant to an alert context which is then used as an input\r\nto the ai
assistant when asked to investigate an alert. While only one\r\nhandler
is currently registered from apm plugin, the benefits are 1.\r\nmaking
this information available to the ai assistant connector since
it\r\ncan't directly call apm api and 2. extending the context with
additional\r\ndata in the future, for example logs.\r\n\r\n#### Follow
up\r\n- Move apm route and associated tests to observability
plugin","sha":"d8831961e868587deb9e72b0c135837977ad6199"}}]}]
BACKPORT-->

Co-authored-by: Kevin Lacabane <kevin.lacabane@elastic.co>
yuliacech pushed a commit to yuliacech/kibana that referenced this issue May 3, 2024
…ugin (elastic#181501)

## Summary
Closes elastic#181286

Create a AlertDetailsContextService in `observability` plugin. The
service can be used by solutions to register data handler fetching
information relevant to an alert context which is then used as an input
to the ai assistant when asked to investigate an alert. While only one
handler is currently registered from apm plugin, the benefits are 1.
making this information available to the ai assistant connector since it
can't directly call apm api and 2. extending the context with additional
data in the future, for example logs.

#### Follow up
- Move apm route and associated tests to observability plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Obs AI Assistant Team:obs-knowledge Observability Experience Knowledge team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants