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

[8.x] [RCA] [Recent events] Create API endpoint to get events (#192947) #193463

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine enabled auto-merge (squash) September 19, 2024 18:17
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:obs-ux-management Observability Management User Experience Team labels Sep 19, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

Closes elastic/observability-dev#3924
Closes elastic/observability-dev#3927

This PR introduces an events API (`/api/observability/events`) that will
fetch -
- All the "point in time" annotations from` observability-annotations`
index. This includes both manual and auto (e.g. service deployment)
annotations
- The annotations will be filtered with supported source fields
(host.name, service.name, slo.id, slo.instanceId) when specified as
`filter`
- Alerts that newly triggered on same source in given time range. The
source needs to be specified as `filter`, when no filter is specified
all alerts triggered in given time range will be returned

### Testing
- Create annotations (APM service deployment annotations and annotations
using Observability UI)
- Generate some alerts
- API call should return annotations and alerts, example API requests
-
`http://localhost:5601/kibana/api/observability/events?rangeFrom=2024-09-01T19:53:20.243Z&rangeTo=2024-09-19T19:53:20.243Z&filter={"annotation.type":"deployment"}`
-
`http://localhost:5601/kibana/api/observability/events?rangeFrom=2024-09-01T19:53:20.243Z&rangeTo=2024-09-19T19:53:20.243Z&filter={"slo.id":"*"}`
-
`http://localhost:5601/kibana/api/observability/events?rangeFrom=2024-09-01T19:53:20.243Z&rangeTo=2024-09-19T19:53:20.243Z&filter={"host.name":"host-0"}`
-
`http://localhost:5601/kibana/api/observability/events?rangeFrom=2024-09-01T19:53:20.243Z&rangeTo=2024-09-19T19:53:20.243Z`

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 808212e)
@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 19, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: 1407654
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-193463-1407654c43f1

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #7 / Alerting alerts_as_data alerts as data should generate expected events with a alertDelay with AAD (rule registry)
  • [job] [logs] FTR Configs #26 / dashboard app - group 4 dashboard empty state adds a new data view when no data views

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
investigateApp 557 560 +3

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/investigation-shared 66 73 +7

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
investigateApp 463.4KB 464.2KB +814.0B
Unknown metric groups

API count

id before after diff
@kbn/investigation-shared 66 73 +7

History

  • 💔 Build #235735 failed b2da94d70b9e8d64e035c5f20a1f46e5cdfa2222

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @benakansara

@kibanamachine kibanamachine merged commit 438284e into elastic:8.x Sep 19, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ci:project-deploy-observability Create an Observability project Team:obs-ux-management Observability Management User Experience Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants