Commit graph

52 commits

Author SHA1 Message Date
Kibana Machine
43f84bb5c9
[8.16] [SLOs] Added $state into filters schema !! (#202887) (#203055)
# Backport

This will backport the following commits from `main` to `8.16`:
- [[SLOs] Added $state into filters schema !!
(#202887)](https://github.com/elastic/kibana/pull/202887)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT
[{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2024-12-05T09:12:48Z","message":"[SLOs]
Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes
https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into
filters schema
!!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-major"],"title":"[SLOs]
Added $state into filters schema
!!","number":202887,"url":"https://github.com/elastic/kibana/pull/202887","mergeCommit":{"message":"[SLOs]
Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes
https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into
filters schema
!!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202887","number":202887,"mergeCommit":{"message":"[SLOs]
Added $state into filters schema !! (#202887)\n\n## Summary\r\n\r\nfixes
https://github.com/elastic/kibana/issues/202999\r\n\r\nAdded $state into
filters schema !!","sha":"51e63eeaccd9998d473ef62d11d530697a836e7f"}}]}]
BACKPORT-->

Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2024-12-05 05:27:16 -06:00
Kibana Machine
ebe9f29b59
[8.16] fix(slo): Override transform _id to ensure uniqness (#198610) (#198699)
# Backport

This will backport the following commits from `main` to `8.16`:
- [fix(slo): Override transform _id to ensure uniqness
(#198610)](https://github.com/elastic/kibana/pull/198610)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"kevin.delemme@elastic.co"},"sourceCommit":{"committedDate":"2024-11-01T15:36:41Z","message":"fix(slo):
Override transform _id to ensure uniqness
(#198610)","sha":"98db4d6f75f05eba1682e0e903bf2d9c909b37f2","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management","v8.16.0"],"title":"fix(slo):
Override transform _id to ensure
uniqness","number":198610,"url":"https://github.com/elastic/kibana/pull/198610","mergeCommit":{"message":"fix(slo):
Override transform _id to ensure uniqness
(#198610)","sha":"98db4d6f75f05eba1682e0e903bf2d9c909b37f2"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198610","number":198610,"mergeCommit":{"message":"fix(slo):
Override transform _id to ensure uniqness
(#198610)","sha":"98db4d6f75f05eba1682e0e903bf2d9c909b37f2"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
2024-11-01 12:18:49 -05:00
Kibana Machine
647ac36494
[8.x] Use groupBy when groupings is not populated correctly (#189672) (#193456)
# Backport

This will backport the following commits from `main` to `8.x`:
- [Use groupBy when groupings is not populated correctly
(#189672)](https://github.com/elastic/kibana/pull/189672)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"kevin.delemme@elastic.co"},"sourceCommit":{"committedDate":"2024-09-19T17:19:23Z","message":"Use
groupBy when groupings is not populated correctly
(#189672)","sha":"c509747a7b59da5eec63d95792404b1ad3559131","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management","v8.16.0"],"title":"Use
groupBy when groupings is not populated
correctly","number":189672,"url":"https://github.com/elastic/kibana/pull/189672","mergeCommit":{"message":"Use
groupBy when groupings is not populated correctly
(#189672)","sha":"c509747a7b59da5eec63d95792404b1ad3559131"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/189672","number":189672,"mergeCommit":{"message":"Use
groupBy when groupings is not populated correctly
(#189672)","sha":"c509747a7b59da5eec63d95792404b1ad3559131"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
2024-09-19 13:48:50 -05:00
Kevin Delemme
c0b65d605c
feat(slo): group by instance id (#186131) 2024-06-19 09:04:48 -04:00
Kevin Delemme
41dc4173c5
feat(slo): add burn rate (#184766) 2024-06-17 11:38:04 -04:00
Shahzad
f3fdb0f398
[SLO Form] Use saved Data view id , handle runtime mappings (#176662)
## Summary

Fixes https://github.com/elastic/kibana/issues/173771


Use saved data view id instead of index pattern where it's available.
Inject runtime mappings from the dataview into transform.

- [ ] Go to Discover and add a runtime field to the data view (this is
only available in Discover)
- [ ] Make sure filtering works based on the data view

We are not supporting "scripted fields" from the Index Management
DataView editor.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-06-07 14:17:21 +02:00
Shahzad
ce4375f770
[SLOs] Add field to filters (#184510)
## Summary

Fixes missing field !!
2024-05-30 15:53:57 +02:00
Kevin Delemme
5a2f1ac5ba
feat(slo): prevent initial backfill (#184312) 2024-05-28 10:03:26 -04:00
Kevin Delemme
2e9f1baf13
fix(slo): history details data (#183097) 2024-05-16 12:56:51 -04:00
Shahzad
3e9a8086d7
[SLOs] Filter out stale SLOs by default from overview (#182745)
## Summary

Fixes https://github.com/elastic/kibana/issues/176712

Added a way to define threshold to declare SLOs stale state , for now i
have chosen if it hasn't been updated in 48 hours, need product feedback
on this

<img width="1145" alt="image"
src="2ce11a60-2ed5-4929-a8ab-9d26d93f6956">

Added an overview panel to indicate how many SLOs are in stale state ,
user can click on each EuiState component to filter SLOs by


<img width="1725" alt="image"
src="352a893d-083d-4448-91bd-6737cfbe63f1">

Also added Alerts overview , clicking will take user to alerts or rules
page, pref filtered with burn rate

<img width="505" alt="image"
src="97387708-54e5-4c0d-9a09-d740e2087e79">
2024-05-15 17:28:14 +02:00
Dominique Clarke
d3945a3e50
[SLOS] fix APM group by cardinality count (#183171)
## Summary
Resolves https://github.com/elastic/kibana/issues/179046
Summarize your PR. If it involves visual changes include a screenshot or
gif.

Applies filters based on the selected APM indicator params to the
cardinality count query.

<img width="845" alt="Screenshot 2024-05-10 at 1 07 27 PM"
src="7283f7cc-b141-47e2-883e-e463556e4aec">

### Testing.
1. Create mock api data via `node scripts/synthtrace continuous_rollups
--live`
2. Navigate to create SLI and choose APM latency
3. Select a service
4. Select group by as `service.name`. Cardinality count should be 1
5. Select environment all and change the group by to
`service.environment`. Cardinality count should be 2.
6. Now select a specific environment. Notice cardinality count changes
to 1.
7. Repeat this testing strategy with transaction name and transaction
type, changing the group by field to `transaction.name` or
`transaction.type`, respectively and playing around with the ALL_VALUE
versus a specific value.
8. Also make sure to test the global filter for regressions

### Release note
The cardinality count for SLOs generated from a single SLI definition
was previously incorrect for APM latency and APM availability SLIs. The
cardinality count is now accurate.
2024-05-14 14:45:38 -04:00
Kevin Delemme
d529dbae98
feat(slo): remove worst performing for no data group' (#182849) 2024-05-08 16:37:39 -04:00
Kevin Delemme
63ad54689f
feat(slo): delete SLO instance (#182190) 2024-05-03 11:15:53 -04:00
Shahzad
151aab5c15
[SLOs] Add details page history tab (#181150)
## Summary

This will allow users to view data beyond default values in details page
chart, users will be able to select date range via picker to view
historical SLI, Burn rate or Good/Bad Events chart


48a6a029-ad36-4457-b195-4ab2d739fca0


<img width="1726" alt="image"
src="c8936443-5fe4-4925-9a9f-a22c847f32b7">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-05-01 11:03:41 +00:00
Shahzad
390628d665
[SLOs] Disable federated view settings in serverless (#181880)
## Summary

Fixes https://github.com/elastic/kibana/issues/181739

Disable federated view settings in serverless !!

- [ ] Disabled route and settings page in public
- [ ] Uses different put request schema on serverless which doesn't
contains remote cluster settings
2024-04-30 22:04:10 +02:00
Kevin Delemme
2d63f721a9
feat(slo): Consider empty slice as good slice for sli calculation purposes on timeslice budgeting method (#181888) 2024-04-30 09:51:36 -07:00
Kevin Delemme
06d32af345
feat(slo): health status (#181351) 2024-04-30 07:26:30 -07:00
Dominique Clarke
b2a8bfb209
[SLO] filter no data values for slo preview chart (#181619)
## Summary

Resolves https://github.com/elastic/kibana/issues/179075

Filters out no data values (-1) for slo preview chart, in order to
ensure that the bounds do not end up spanning all the way to -100%.

Before
<img width="822" alt="Screenshot 2024-04-24 at 1 46 20 PM"
src="30b7cd9e-d4a1-4e9a-b5a0-e5fb8d1fe857">

After
<img width="833" alt="Screenshot 2024-04-24 at 1 42 54 PM"
src="ea63be37-46f8-4212-b0b4-f01038f5b353">
2024-04-25 15:54:30 -04:00
Shahzad
d3207ec1ec
[SLOs] Add/edit form show tags suggestions (#181075)
## Summary

Show tags as suggestions from existing SLOs

<img width="1194" alt="image"
src="12699ed3-ff26-436d-a63f-a3b9422a1cfc">
2024-04-18 15:46:28 +02:00
Panagiota Mitsopoulou
42e24b58ed
[SLO] [Alert detail page] render log rate analysis for custom kql (#179147)
Fixes https://github.com/elastic/kibana/issues/178446

This PR adds the following AI Ops features to the Burn rate alert detail
page:

- Log Rate Analysis
- ML features / AI Assistant


bf00c636-10ab-4cd8-859b-4a8f0471bf15

## Implementation details
Log rate analysis is useful when there is a significant dip/spike in
number of logs. It finds significant differences between the logs in
baseline (before dip/spike) and in deviation (after dip/spike). For the
Log Rate Analysis to work on the Alert details of an SLO burn rate rule
we had to specify a few params, here are the most important ones:
- dataView
- esSearchQuery
- timeRange -> I am looking into this and need a few clarifications
regarding lookBackPeriod
- initialAnalysisStart

For the esQuery here's what we used

```
const finalQuery = {
    bool: {
      filter: [customTotalFilter, customFilters, customGroupByFilters],
      must_not: customGoodFilter,
    },
  };
```

We add the `total query`, any `optional filters` and any `group by
filters` to the `filter` clause of the ES query, where as we add the
good filter in the `must_not` clause.

## 🔬 How to test
- Add the following lines to your `config/kibana.dev.yaml`:
  - `server.basePath: '/kibana'`
  - `server.publicBaseUrl: 'http://localhost:5601/kibana'`
- Start with the following command: `node x-pack/scripts/data_forge.js
--events-per-cycle 50 --lookback now-1d --dataset fake_stack
--install-kibana-assets --kibana-url http://localhost:5601/kibana
--event-template good` to start with some good events
- Wait til the log message says `info Waiting 60000ms`
- Create one SLO:
- "Admin Console Availability" using the "Custom Query" SLI with the
`Admin Console` DataView, set the "Good query" to
`http.response.status_code < 500` and the set the "Total query" to
`http.response.status_code: *` using a rolling `7d` time window
- You should have 1 burn rate rule created by default
- Stop the first `data_forge.js` command
- Start `node x-pack/scripts/data_forge.js --events-per-cycle 50
--lookback now --dataset fake_stack --install-kibana-assets --kibana-url
http://localhost:5601/kibana --event-template bad`
- Go to alert details page of the burn rate rule to verify that the Log
Rate Analysis tool detected a spike

Note: you can skip first step, but in this case you should start kibana
with this command instead `yarn start --no-base-path`. This way you
don't have to pass `--kibana-url` when running the `data_forge` command

I included some snapshot tests with different SLOs that could be used
for verifying the generation of the ES query. Here are a few examples:
- Good query (KQL), no filter, no total query
- Good query (filter), no optional filter, no total query
- Good query (kql) optional filter (KQL), no total query
- Good query (kql), optional filter (filter), no total query
- Good query (kql), optional filter (kql), total query (kql)
- Good query (filter), optional filter(filter), total query(kql)

💀 I will need extra help testing this feature, to make sure that
provided params to the `LogRateAnalysisContent` component. Especially
`esSearchQuery` and `timeRange` (timeRange still WIP, but I want some
early feedback on the lookbackDuration and the intervalFactor)

## ✔️ Acceptance criteria
- Render the Log Rate Analysis tool only to platinum users and above
- Render AI assistant contextual insights only to platinum users and
above

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
Co-authored-by: Walter Rafelsberger <walter.rafelsberger@elastic.co>
2024-04-16 09:11:34 -07:00
Kevin Delemme
721d354a13
[SLO] Implement federated views (#178050) 2024-04-16 09:15:51 -04:00
Panagiota Mitsopoulou
081f4e44ff
[SLO] Group filters in the Overview embeddable (#179620)
Fixes https://github.com/elastic/kibana/issues/179908
Fixes https://github.com/elastic/kibana/issues/179895




2924e619-9080-4c80-b5c3-7066a100026c



## UI changes

### SLO Overview configuration
<img width="600" alt="Screenshot 2024-04-15 at 13 34 21"
src="3635c9e7-e5c1-454b-bb60-93b5d637083e">


### Rendered panel with Group of SLOs
<img width="1022" alt="Screenshot 2024-04-03 at 13 08 11"
src="377c5cd0-b6e0-4906-888b-93893a5f1208">

### Updated SLO list group by page
<img width="1316" alt="Screenshot 2024-03-28 at 23 56 12"
src="d6b306a0-77e8-44e5-b103-ce3537b0ceda">

## Responsiveness
This PR makes sure that the UI doesn't look broken in smaller screen
resolutions and fixes following issues. If we want to display things
differently in smaller screen resolutions, we should handle in a follow
up PR (cc @maciejforcone)

### Before 

####  SLO list page in smaller screen resolution
<img width="500" alt="Screenshot 2024-04-03 at 10 14 31"
src="f2b11408-3356-4f4b-9c4b-ec085ff494fa">

####  Rendered panel with Group of SLOs in smaller screen resolution
<img width="500" alt="Screenshot 2024-04-03 at 10 13 18"
src="6e37ad61-5a0a-4027-8b90-4f8fad243637">

#### After

####  SLO list page in smaller screen resolution
<img width="500" alt="Screenshot 2024-04-03 at 11 04 35"
src="fa875aa8-bc54-4c6b-9159-4462e585a9cb">

####  Rendered panel with Group of SLOs in smaller screen resolution
I applied a `min-width` of 100px to the SLO name, so that it doesn't
look broken. What is not visible in the screenshot is a horizontal
scrollbar, so user can still see the part with Worst performing that is
not visible.
<img width="500" alt="Screenshot 2024-04-03 at 10 13 47"
src="d9566ca3-42af-4d85-a3f7-6374cc27981d">


## Acceptance criteria
- Overview configuration
  -  toggles between Single SLO or Grouped SLOs
- Required field for the `Grouped SLOs` view is only the `Group by`
option, the rest filters are optional
  - Users can optionally select the groups they want
  - Users can use the KQL bar to apply extra filters
- Overview configuration opens in a `Flyout` (modal was causing some
issues with z-index and kqlbar suggestions being displayed below the
overlay)
- Embeddable panel
- The rendered panel shows the selected groups with summary data divided
with a horizontal like and no border around it
- Clicking on a group opens an accordion similar to the SLO list group
by page
 - An Edit criteria link is visible only in the Grouped Embeddable panel
- Clicking on the Edit criteria link opens the configuration modal,
showing only the grouped tab and hiding the tabbed button group
 - The grouped embeddable should react to Dashboard's Refresh button
 - `Add to Dashboard` action should be hidden in Dashboard context

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
2024-04-15 15:55:15 -07:00
Dominique Clarke
8a594a4f96
[SLO] Add synthetics availability SLI (#177842)
## Summary

Relates to
https://github.com/elastic/actionable-observability/issues/122
Relates to https://github.com/elastic/observability-dev/issues/2931

Adds the Synthetics SLI

Also adds a concept of a [`meta` key
](https://github.com/elastic/kibana/pull/177842/files#diff-9540eeb8237fdcf36ceac67af9cc67e192c7b67ff1c9a944db3635f9e953a9a1R139)
to the `SLOWithSummaryResponse` object, to hold arbitrary fields related
to a specific indicator. In the case of synthetics, I'm using this key
to store `config_id` (the monitor's SO id) and `observer.name` (the
monitors location id). These keys are critical for linking back to
Synthetics, but not available elsewhere.

## Release note
Adds the ability to create an SLI based on the availability of your
synthetics monitors. Select one or multiple monitors, or groups of
monitors via projects or tags. Individual SLOs will automatically be
generated for each monitor and location combination, based on your
specified filters.

<img width="862" alt="Screenshot 2024-03-04 at 8 40 37 AM"
src="53c84fcb-6209-43f4-bac4-b10032795d02">
<img width="724" alt="Screenshot 2024-03-04 at 8 41 47 AM"
src="89a9ef2c-82c6-470a-ac03-e19bd24e52c9">
<img width="1435" alt="Screenshot 2024-03-04 at 8 41 59 AM"
src="44e9843f-053b-447c-9298-6ec4c66496d8">

### Testing
1. On main, create a few different SLIs
2. Check out this branch
3. Create synthetics monitors. You can do so by creating an oblt
cluster, using the `kibana.yml` provided, and then navigating to the
Synthetics app. Be sure to create monitors with tags.
4. Navigate to the SLO page. Create a test Synthetics SLI. Ensure that
the tags you created appear in the `tags` suggestions, and the monitors
you created appear in the `monitor name` suggestions. When filtering by
a specific tag, you should only see monitors with that tag. On the
opposite side, when filtering by a monitor name(s) you should only see
tags related to those monitors.
5. Navigate to the SLO overview. Ensure the SLO is computed correctly
6. Navigate to the SLO details page. Ensure all of the visualizations
are populated correctly. Ensure the groupings value appear correct.
Under the `Synthetics Monitor` key in the Overview table, click the name
and ensure that you can navigate to the Synthetics app successfully.


### Checklist

Delete any items that are not applicable to this PR.

- [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/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-03-08 10:15:53 -05:00
Dominique Clarke
882682b6bf
[SLO] allow multi group by in creation form (#175063)
## Summary

Enables grouping SLOs by multiple fields.

Resolves https://github.com/elastic/kibana/issues/174228

Adjusts the `instanceId`
[implementation](https://github.com/elastic/kibana/pull/175063/files#diff-c9c4989cf8d323448464b70825408b535b1fa6cc355df26a2acfba45d8c05232R35)
to concat values from each field to build the instance id.

Uses the `groupings` key from the
[summary](https://github.com/elastic/kibana/pull/175063/files#diff-40b886fca239a397d0990f3db135f7b35822ee0aa93063be219bd23cafc9be6cR137)
[documents](https://github.com/elastic/kibana/pull/175063/files#diff-d5cd07fb8fb91091a7f65d9f59c268600f03305167b375ec579773144428ee68R156)
to display group by values in the SLO list and SLO detail pages.

### Testing
1. Before checking out this PR, create an SLO on main with a group by
2. Check out this PR. The instance information should continue to
populate, now with the field label
<img width="364" alt="Screenshot 2024-02-05 at 9 50 12 PM"
src="d6004cc6-58b8-4319-b28b-b09e7849deba">
<img width="1427" alt="Screenshot 2024-02-05 at 9 50 26 PM"
src="10aacc47-ae68-489d-b728-6f74816e7c69">
<img width="583" alt="Screenshot 2024-02-05 at 9 50 38 PM"
src="50bcc168-bdb7-421b-8a6f-9fd0b079b612">
3. Navigate to the edit flow. The group by field should appear in the
ComboBox.
<img width="803" alt="Screenshot 2024-02-05 at 9 56 28 PM"
src="c9601e61-85b9-49ad-adc0-0ebfad67701e">
4. Attempt to create a second group by
<img width="815" alt="Screenshot 2024-02-05 at 10 57 38 PM"
src="e461681c-720f-4290-a01c-0cd00c9cbb72">
5. Save and observe the created instances.
<img width="716" alt="Screenshot 2024-02-06 at 10 39 56 AM"
src="46599aaa-ac93-4362-943a-4579b2e8c552">
<img width="590" alt="Screenshot 2024-02-06 at 11 24 52 AM"
src="ef9d65fb-301c-446d-a748-e82d8460423c">
<img width="666" alt="Screenshot 2024-02-06 at 11 25 08 AM"
src="6713ba80-6a2a-4087-9335-cfa935bf0ebf">
<img width="1449" alt="Screenshot 2024-02-06 at 11 25 20 AM"
src="c7088ab3-847f-436e-8918-2a5f15593ac4">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-02-26 12:46:57 -05:00
Shahzad
2d36a14de9
[SLOs] Added unified search into form (#176496)
## Summary

Fixes https://github.com/elastic/kibana/issues/176276

Added unified search into form !!

Update schema to reflect new changes !!


<img width="1189" alt="image"
src="b1ba4da4-f23e-435c-8778-b819bc2ff7be">
2024-02-13 21:08:10 +01:00
Panagiota Mitsopoulou
4e15933a9b
[SLOs] Slo group feature (#176079)
Fixes https://github.com/elastic/kibana/issues/173600 and
https://github.com/elastic/kibana/issues/176106

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dominique Belcher <dominique.clarke@elastic.co>
Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
2024-02-05 12:15:00 -07:00
Chris Cowan
134b25c1a3
[SLO] Enable timeslice metric visualization on SLO detail page (#175281)
## Summary

This PR adds support for the Timeslice Metric visualization on the SLO
Detail page.

Fixes #170135 

<img width="1756" alt="image"
src="56599b91-8827-4c6a-9df1-ccd80c5ab097">
2024-01-30 07:59:18 -07:00
Shahzad
f1057ca3e6
[SLOs] Unified Search (#174054)
## Summary

Fixes https://github.com/elastic/kibana/issues/173601

Implement Unified Search in SLO List view 

1. SLO title has been removed to make it more consistent with other
kibana apps
2. Feedback button is moved up 
3. Auto refresh is removed

<img width="1720" alt="image"
src="0ff6fd83-98ac-4737-bf4f-aa087739f110">


<img width="1728" alt="image"
src="aa71e2e7-3bc8-4be7-afb3-f4b7efffc953">

Filters

<img width="1727" alt="image"
src="d3bbf3d3-d2b3-4574-ae7f-bb8258016930">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-01-23 10:16:22 +01:00
Shahzad
9dc9d8ff8f
[SLOs] Configuration inspect api and flyout (#173723)
## Summary

It will show all the associated configs at one place in json form,
configuration, ingest pipeline config, roll up transform and summary
transform config !!

Motivation is to understand things while onboarding devs to slo and
during normal development.



a22ad292-ba59-4145-989e-80803b6a1e3e
2024-01-03 17:40:17 +01:00
Kevin Delemme
b51304f3f3
feat(slo): new slo architecture (#172224) 2023-12-12 08:45:12 -05:00
Kevin Delemme
7398fe9de0
feat(slo): add events chart (#170896) 2023-11-16 15:19:57 -05:00
Kevin Delemme
3791a73dfa
revert(slo): enrich policy and reset api (#171420)
- Revert "feat(slo): add reset api (#170473)"
- Revert "[SLO] Use enrich policy to add SLO details to summary
(#169993)"
2023-11-16 13:10:03 -05:00
Kevin Delemme
af1ad47341
feat(slo): add reset api (#170473) 2023-11-15 20:27:21 -05:00
Chris Cowan
b9c08bac92
[SLO] Add support for document count to custom metric indicator (#170913)
## 🍒 Summary

This PR fixes #170905 by adding the aggregation menu to the Custom
Metric indicator to allow the user to pick either `doc_count` or `sum`
for the aggregation.

<img width="1152" alt="image"
src="35aea8bd-d21c-4780-bad6-1efe5fc8902b">
2023-11-09 08:26:25 -07:00
Paul Bianciardi
c72d4d3372
Update new codeowners for Obs team changes (#170182)
Updates new teams as codeowners for Observability team changes.

Also took the opportunity to:
- Delete some paths that no longer exist
- Split infra code ownership between teams (from #168992)
2023-11-08 14:30:17 +00:00
Chris Cowan
befbe10fd3
[SLO] Add timeslice metric indicator (#168539)
## Summary

This PR adds the new Timeslice Metric indicator for SLOs. Due to the
nature of these statistical aggregations, this indicator requires the
budgeting method to be set to `timeslices`; we ignore the timeslice
threshold in favor of the threshold set in the metric definition.

Users can create SLOs based on the following aggregations:
- Average
- Min
- Max
- Sum
- Cardinality
- Percentile
- Document count
- Std. Deviation
- Last Value

Other notable feature include:

- The ability to define an equation which supports basic math and logic
- Users can define a threshold based on the equation for good slices vs
bad slices

<img width="800" alt="image"
src="05af1ced-40cd-4a05-9dfc-e83ea7bfb5ab">

### Counter Metric Example

<img width="800" alt="image"
src="05eb5a0f-3043-493d-8add-df0d3bf8de02">


CC: @lucasmoore

---------

Co-authored-by: Kevin Delemme <kdelemme@gmail.com>
2023-10-17 15:58:58 -06:00
Kevin Delemme
194f130b60
chore(slo): remove composite slo code (#168481) 2023-10-13 10:41:29 -04:00
Kevin Delemme
889f067187
feat(slo): delete slo instances (#165270) 2023-09-05 16:02:05 -04:00
Kevin Delemme
733869e9e5
chore(slo): general enhancement (#164723) 2023-08-28 14:50:38 -04:00
Kevin Delemme
65573fc93e
chore(slo): optional filter fields (#164630) 2023-08-24 08:09:31 -04:00
Kevin Delemme
b270602601
feat(slo): refactor fetch slo definitions hook (#164466) 2023-08-24 08:07:02 -04:00
Chris Cowan
d87d998a2e
[SLO] Add support to burn rate visualization for group by (#163125)
## Summary

This PR fixes #163121 by adding support for the `instanceId` the burn
rate endpoint. This also updates the burn rate visualization to send the
`instanceId` as an optional attribute to the post body JSON object.

```JSON
POST /internal/observability/slos/6bad8fe0-323b-11ee-ac4c-37263913b2b5/_burn_rates
{
    "windows": [
        {
            "name": "CRITICAL_LONG",
            "duration": "1h"
        },
        {
            "name": "CRITICAL_SHORT",
            "duration": "5m"
        },
        {
            "name": "HIGH_LONG",
            "duration": "6h"
        },
        {
            "name": "HIGH_SHORT",
            "duration": "30m"
        },
        {
            "name": "MEDIUM_LONG",
            "duration": "24h"
        },
        {
            "name": "MEDIUM_SHORT",
            "duration": "120m"
        },
        {
            "name": "LOW_LONG",
            "duration": "72h"
        },
        {
            "name": "LOW_SHORT",
            "duration": "360m"
        }
    ],
    "instanceId": "you-got.mail"
}
```
2023-08-04 12:39:01 -06:00
Kevin Delemme
498d6fdccc
feat(slo): Handle instanceId for historical summary (#163114) 2023-08-03 20:41:51 -04:00
Kevin Delemme
7d3fe32976
feat(slo): Introduce group by (#163008) 2023-08-03 14:15:50 -04:00
Kevin Delemme
757c881b9a
feat(slo): introduce new search capabilities (#162665) 2023-07-31 20:13:38 -04:00
Chris Cowan
06f7cbf9b6
[SLO] Add indicator to support histogram fields (#161582)
## Summary


This PR add a new indicator to support histogram fields. This will allow
you to either use a `range` aggregation or `value_count` aggregation for
the good and total events; including support for filtering with KQL on
both event types. When using a `range` aggregation, both the `from` and
`to` thresholds are required for the range and events will be to total
number of events within that range.[ Keep in mind, with the `range`
aggregation, the range includes the `from` value and excludes the `to`
value.](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-range-aggregation.html)

This PR also includes support for using the histogram field for a
"Custom Metric" indicator, `sum` is calculated on the values and not the
counts. If you need it calculated on the counts then you have to use the
histogram indicator.

<img width="776" alt="image"
src="1d46b722-df13-417e-bf3b-b3c450933da2">

---------

Co-authored-by: Kevin Delemme <kdelemme@gmail.com>
2023-07-11 16:44:08 -07:00
Chris Cowan
099835fad5
[SLO] Support filters for good/total custom metrics (#161308)
## Summary

This PR adds support for applying a KQL filter to the good/total
metrics.

<img width="858" alt="image"
src="c271352c-10fd-49f1-89b8-a352b69f7f7c">
2023-07-06 08:00:09 -06:00
Kevin Delemme
f5a111eaab
chore(slo): improve error handling (#160081)
Resolves https://github.com/elastic/kibana/issues/156145
Resolves https://github.com/elastic/kibana/issues/160293

## 📝 Summary

This PR fixes a bug related to `shouldUnregister` used on controlled
fields which removes part of the form state while submitting the form,
due to the components unmounting. This is a weird issue between React
Hook Form and React Query, as if we were not using optimistic update
with RQ, we won't notice the problem in the first place.

I have done a few things in this PR:
1. I've introduced a `CreateSLOForm` type to decouple what the API is
expecting (CreateSLOInput) and how we structure the form and store the
form state. This is particularly useful when building a partial
`CreateSLOForm` from a partial url state `_a`.
2. I've introduced a hook that handles the change of indicator
correctly, resetting the default value as we change. The default values
are typed with each indicator schema type, and the hook will throw when
a new indicator is introduced but not handled there.
3. I've removed the custom metric manual useEffect and instead rely on
hidden registered inputs.
4. The time window type handles correctly the initial state, and reload
the default values when we change from rolling <-> calendar aligned.
5. I've grouped some code from the main form component into their own
hook to 1. add a layer of abstraction and 2. make the code more cohesive
6. When the create SLO call fails, we redirect the user to the form with
the previously entered values.


## 🧪 Testing

I would suggest to create and edit some SLOs, playing with the different
time window, budgeting method, indicators.
The main thing to look for are: 
1. Switching indicator reset the form as expected
2. When editing an SLO, all the form fields are populated correctly with
the initial SLO values.
3. Creating an SLO with a bad indicator, for example with an invalid KQL
query, will redirect to the form with the previous value filled.


https://www.loom.com/share/516c3d5a1fa74db6bf839cfa0cf41f5d?sid=f0a1a33f-eb29-4b8f-b65f-ffce2313bad8

---------

Co-authored-by: Coen Warmer <coen.warmer@gmail.com>
2023-06-23 12:41:24 -04:00
Chris Cowan
c0d3a93dff
[SLO] Add burn rate windows to SLO detail page (#159750)
## Summary

This PR adds a burn rate visualization to the overview tab of the SLO
Detail page. This PR also includes a fix for fetching the index pattern
fields hook; it uses the DataViews service to fetch the fields instead
of the internal API.

<img width="1170" alt="image"
src="41057791-880e-4cc8-a0c7-02a0f18aaeca">

### All good

<img width="1141" alt="image"
src="3ec07efa-e35a-4251-87f3-7ddc836171b7">

### Degrading

<img width="1141" alt="image"
src="a6d347be-7b55-404e-99a1-14ad4a38ad36">

### EVERYTHING IS BURNING 🔥

<img width="1141" alt="image"
src="9ed05875-b907-4a57-8387-a094876dd35e">


### Recovering in the dark

<img width="1151" alt="image"
src="f2999c7a-f97b-474c-8146-4565445df892">

### No data

<img width="1141" alt="image"
src="675a65a4-91b1-4de3-9f51-b65760efbb66">
2023-06-20 15:02:48 -07:00
Kevin Delemme
3a34e3593d
feat(slo): Support for calendar aligned time window (#159949)
Resolves https://github.com/elastic/kibana/issues/159948

## 📝 Summary

This PR updates the SLO form to support the calendar aligned time
windows for both create and edit flow.
I've also moved the budgeting method selector down, so when selecting
"timeslices", the timeslices related inputs are shown next to it on the
same line.
 

| Screenshot | Screenshot |
|--------|--------| 
|
![screencapture-localhost-5601-kibana-app-observability-slos-edit-c1a51ac0-0eb0-11ee-8f7a-0da90ce06520-2023-06-19-11_53_05](9e786a17-ebce-43b5-b063-090fe89a1821)
|
![screencapture-localhost-5601-kibana-app-observability-slos-edit-c1a51ac0-0eb0-11ee-8f7a-0da90ce06520-2023-06-19-11_52_31](c3e7cab1-31c2-490b-b38f-6f7b01a3fc95)
|
2023-06-20 07:43:17 -04:00