[Agent Builder] APM error AI insights #243734
Conversation
.../public/components/app/error_group_details/error_sampler/error_sample_contextual_insight.tsx
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/packages/ai-agent/contextual_insight/robot_icon.tsx
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/apm/public/application/index.tsx
Outdated
Show resolved
Hide resolved
...omponents/app/error_group_details/error_sampler/error_sample_ai_agent_contextual_insight.tsx
Outdated
Show resolved
Hide resolved
...omponents/app/error_group_details/error_sampler/error_sample_ai_agent_contextual_insight.tsx
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/apm/server/routes/ai_agent/route.ts
Outdated
Show resolved
Hide resolved
...y/plugins/apm/server/routes/agent_builder/ai_insights/explain_error/get_error_ai_insights.ts
Outdated
Show resolved
Hide resolved
...ility/plugins/apm/server/routes/agent_builder/ai_insights/explain_error/get_error_context.ts
Outdated
Show resolved
Hide resolved
...c/components/app/error_group_details/error_sampler/error_sample_agent_builder_ai_insight.tsx
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/observability_agent/server/attachments/error.ts
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/observability_agent/server/attachments/error.ts
Outdated
Show resolved
Hide resolved
x-pack/solutions/observability/plugins/observability_agent/server/attachments/error.ts
Outdated
Show resolved
Hide resolved
...lutions/observability/plugins/observability_agent_builder/server/routes/ai_insights/route.ts
Show resolved
Hide resolved
...s/observability_agent_builder/server/routes/ai_insights/apm_error/fetch_distributed_trace.ts
Outdated
Show resolved
Hide resolved
...gins/apm/public/components/app/error_group_details/error_sampler/error_sample_ai_insight.tsx
Outdated
Show resolved
Hide resolved
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#10052[✅] x-pack/solutions/observability/test/api_integration_deployment_agnostic/feature_flag_configs/stateful/oblt.ai_agent.stateful.config.ts: 50/50 tests passed. |
|
Your serverless tests will fail because they need to be registered sync https://github.com/elastic/kibana/pull/244023/files#diff-31fd5a7a673266714e7b4d8b96c619111a6f01f3d4642e24622787b6b7082cc4 . I went ahead and made the change in my PR since we're removing that feature flag async call in #245299 |
Thanks @neptunian |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
History
cc @viduni94 |
| @@ -0,0 +1,19 @@ | |||
| /* | |||
There was a problem hiding this comment.
I would move this file to be a custom hook, this way, you could use useApmPluginContext directly instead of from params
Closes elastic/obs-ai-team#413 ## Summary This PR handles APM error AI insights via Agent Builder. Attachments: - `AI_INSIGHT` attachment type with AI Insight summary - `ERROR` attachment with `errorId` and other params to fetch the error document. ### Additions - Adds an API to pre-fetch the error data and generate an LLM response by calling the inference client. - Once the summary is generated it's showed inline on the page (uses the common component) - The user can click on "Start conversation" which opens to the agent builder flyout to continue the conversation along with the `AI_INSIGHT` attachment and `ERROR` attachment. - When the user opens the agent builder flyout from an error page using the global nav button, the ERROR attachment is added to the context of the flyout. - License check before rendering AI insights (we may want to make this part of the shared component) To enable agent builder and the nav: ``` uiSettings: overrides: agentBuilder:navEnabled: true agentBuilder:enabled: true ``` To see the AI insight, feature flag must be enabled for now. This feature will be hidden on main for now behind this flag until the Gen AI Setting is available. ``` feature_flags.overrides: observabilityAgent.enabled: true ``` ### UI for AI insights This PR consumes the common UI component in the `observability-agent-builder` package. ### Testing Observability test clusters were used for testing. #### Testing instructions 1. Connect to a Observability test cluster 2. In Kibana, go to "Observability" --> "Service Inventory" 3. Pick a service and visit the "Error" tab and select an error 4. Click on "What's this error" ### Screen recording AI INSIGHTS: https://github.com/user-attachments/assets/d1b0b2b2-9805-4737-8929-e27319164649 GLOBAL NAV: https://github.com/user-attachments/assets/2e310f4b-563b-4681-83cb-fd2581936b3a Flaky test runner - https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/10052 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes elastic/obs-ai-team#413 ## Summary This PR handles APM error AI insights via Agent Builder. Attachments: - `AI_INSIGHT` attachment type with AI Insight summary - `ERROR` attachment with `errorId` and other params to fetch the error document. ### Additions - Adds an API to pre-fetch the error data and generate an LLM response by calling the inference client. - Once the summary is generated it's showed inline on the page (uses the common component) - The user can click on "Start conversation" which opens to the agent builder flyout to continue the conversation along with the `AI_INSIGHT` attachment and `ERROR` attachment. - When the user opens the agent builder flyout from an error page using the global nav button, the ERROR attachment is added to the context of the flyout. - License check before rendering AI insights (we may want to make this part of the shared component) To enable agent builder and the nav: ``` uiSettings: overrides: agentBuilder:navEnabled: true agentBuilder:enabled: true ``` To see the AI insight, feature flag must be enabled for now. This feature will be hidden on main for now behind this flag until the Gen AI Setting is available. ``` feature_flags.overrides: observabilityAgent.enabled: true ``` ### UI for AI insights This PR consumes the common UI component in the `observability-agent-builder` package. ### Testing Observability test clusters were used for testing. #### Testing instructions 1. Connect to a Observability test cluster 2. In Kibana, go to "Observability" --> "Service Inventory" 3. Pick a service and visit the "Error" tab and select an error 4. Click on "What's this error" ### Screen recording AI INSIGHTS: https://github.com/user-attachments/assets/d1b0b2b2-9805-4737-8929-e27319164649 GLOBAL NAV: https://github.com/user-attachments/assets/2e310f4b-563b-4681-83cb-fd2581936b3a Flaky test runner - https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/10052 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes https://github.com/elastic/obs-ai-assistant-team/issues/413
Summary
This PR handles APM error AI insights via Agent Builder.
Attachments:
AI_INSIGHTattachment type with AI Insight summaryERRORattachment witherrorIdand other params to fetch the error document.Additions
AI_INSIGHTattachment andERRORattachment.To enable agent builder and the nav:
To see the AI insight, feature flag must be enabled for now. This feature will be hidden on main for now behind this flag until the Gen AI Setting is available.
UI for AI insights
This PR consumes the common UI component in the
observability-agent-builderpackage.Testing
Observability test clusters were used for testing.
Testing instructions
Screen recording
AI INSIGHTS:
522162938-e40dd31b-264e-47e1-b8e8-dec5f7e85897.mov
GLOBAL NAV:
522529317-5ffda2f5-1131-48c3-99c2-612bd5bfca87.mov
Flaky test runner - https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/10052
Checklist
release_note:*label is applied per the guidelinesbackport:*labels.