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

New slo plugin #177937

Merged
merged 86 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
220d7f6
create new slos plugin
mgiota Feb 15, 2024
af1dea4
include new slos plugin in more places
mgiota Feb 20, 2024
199bc18
add SLOs to the sidebar
mgiota Feb 20, 2024
821e629
rename plugin to slo
mgiota Feb 23, 2024
6d16bca
Merge branch 'main' of github.com:elastic/kibana into new_slo_plugin
mgiota Feb 24, 2024
905cf5a
move slo stuff from observability to slo plugin
mgiota Feb 24, 2024
dc12fda
update references
mgiota Mar 4, 2024
da7435d
update more references mainly on public folder
mgiota Mar 5, 2024
41fc81c
more updates
mgiota Mar 5, 2024
634b68d
successfully render first slo pages
mgiota Mar 5, 2024
925f9fd
use typed kibana and fix translations
mgiota Mar 6, 2024
904753c
fix errors and translations
mgiota Mar 6, 2024
8f2a373
register burn rate rule type and embeddable alerts table configuration
mgiota Mar 7, 2024
20a2995
clean up
mgiota Mar 7, 2024
8ab35be
handle redirects of old paths to new app
mgiota Mar 8, 2024
2e127f0
fix failing tests
mgiota Mar 8, 2024
b90e02a
fix translations
mgiota Mar 8, 2024
9398707
update translation files
mgiota Mar 8, 2024
8446fe0
fix more translations
mgiota Mar 8, 2024
7b21743
Add application usage
mgiota Mar 8, 2024
36a5df0
Merge branch 'main' of github.com:elastic/kibana into new_slo_plugin
mgiota Mar 8, 2024
d0c6e32
Merge branch 'main' of github.com:elastic/kibana into new_slo_plugin
mgiota Mar 8, 2024
20897ca
Merge branch 'main' into new_slo_plugin
kibanamachine Mar 8, 2024
3327ac4
fix eslint issues
mgiota Mar 8, 2024
037f384
use old ALERTS_TABLE_ID
mgiota Mar 8, 2024
ddcfa98
fix create slo in logs explorer & more fixes
mgiota Mar 10, 2024
53e8442
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 10, 2024
1e941f5
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine Mar 10, 2024
ead9ecf
[CI] Auto-commit changed files from 'node scripts/build_plugin_list_d…
kibanamachine Mar 10, 2024
02e383a
copy render cell value
shahzad31 Mar 11, 2024
05b7084
move alert components
shahzad31 Mar 11, 2024
ca8a7d6
Merge branch 'main' of https://github.com/elastic/kibana into new_slo…
shahzad31 Mar 11, 2024
9f97061
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 11, 2024
c87039a
commit limits
shahzad31 Mar 11, 2024
91b9b64
Merge branch 'new_slo_plugin' of https://github.com/mgiota/kibana int…
shahzad31 Mar 11, 2024
6ad6dad
fix types
shahzad31 Mar 11, 2024
93a7ab8
types check
shahzad31 Mar 11, 2024
28633b4
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 11, 2024
0f54fa7
is dev flag
shahzad31 Mar 11, 2024
7ab440a
constatns
shahzad31 Mar 11, 2024
b404ad3
Merge branch 'new_slo_plugin' of https://github.com/mgiota/kibana int…
shahzad31 Mar 11, 2024
2d0e9ef
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 11, 2024
bc61ba2
Merge branch 'main' of github.com:elastic/kibana into new_slo_plugin
mgiota Mar 12, 2024
0dd62ce
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 12, 2024
3aeaa85
bring back DatePicker, it is used by ux plugin, rum dashboard
mgiota Mar 12, 2024
e62e11c
revert alert table changes
mgiota Mar 12, 2024
ef76378
move slo embeddable alert table configuration to observability plugin
mgiota Mar 12, 2024
2a2fc5b
fix aiassistant type issues
mgiota Mar 12, 2024
e8caaf2
Merge branch 'main' into new_slo_plugin
kibanamachine Mar 12, 2024
7f527ca
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 12, 2024
fd023d5
delete render_cell_value
mgiota Mar 12, 2024
7357191
remove use_get_alert_flyout_components export
mgiota Mar 12, 2024
60f3844
update application usage keys in the schema to match the registered a…
mgiota Mar 12, 2024
0cbb0af
fix linter issues
mgiota Mar 12, 2024
5c5738d
update telemetry schema
mgiota Mar 12, 2024
f4a7dac
fix imports in tests
mgiota Mar 12, 2024
df2314b
fix CI
mgiota Mar 12, 2024
7f44706
Merge branch 'main' of github.com:elastic/kibana into new_slo_plugin
mgiota Mar 12, 2024
c4471b5
more fixes
mgiota Mar 12, 2024
e332ee0
fix eslint issues
mgiota Mar 12, 2024
3a12e97
Merge branch 'main' into new_slo_plugin
kibanamachine Mar 12, 2024
31fe2f6
remove ObservabilityAIAssistantActionMenuItem from SLO header menu
mgiota Mar 12, 2024
25147a7
fix types
mgiota Mar 13, 2024
5145e70
Merge branch 'main' into new_slo_plugin
kibanamachine Mar 13, 2024
250ffe4
Merge branch 'main' into new_slo_plugin
kibanamachine Mar 13, 2024
5ad3345
Merge branch 'main' into new_slo_plugin
kibanamachine Mar 13, 2024
7573311
enable slo plugin on serverless
mgiota Mar 14, 2024
161e11b
Fix for redirection
CoenWarmer Mar 14, 2024
f83a337
Merge branch 'new_slo_plugin' of https://github.com/mgiota/kibana int…
CoenWarmer Mar 14, 2024
f72fa02
oops bring back observability on serverless
mgiota Mar 14, 2024
efb6a87
add SLOs link in the serverless navigation
mgiota Mar 14, 2024
50c94c5
Merge branch 'main' of github.com:elastic/kibana into new_slo_plugin
mgiota Mar 14, 2024
9f7aaff
fix deep link id for slos
mgiota Mar 14, 2024
6688ad5
Merge branch 'main' of github.com:elastic/kibana into new_slo_plugin
mgiota Mar 18, 2024
70118a8
keep same order for alerts slos cases in the navigation
mgiota Mar 18, 2024
6ddf511
Merge branch 'main' into new_slo_plugin
kibanamachine Mar 18, 2024
0f02d22
handle redirects for slo detail and edit pages
mgiota Mar 18, 2024
4f5638c
Merge branch 'main' into new_slo_plugin
kibanamachine Mar 18, 2024
2e57cfa
Merge branch 'main' into new_slo_plugin
kibanamachine Mar 18, 2024
49d838b
Merge branch 'main' into new_slo_plugin
kibanamachine Mar 18, 2024
5425dbd
fix failing tests
mgiota Mar 18, 2024
b6bfce4
update global nav
mgiota Mar 18, 2024
b992500
Merge branch 'main' into new_slo_plugin
kibanamachine Mar 18, 2024
a561a6f
show slo link when right capabilities
mgiota Mar 18, 2024
cbabcd5
slos is not a deep link anymore, remove from these tests
mgiota Mar 19, 2024
c401dff
Merge branch 'main' of github.com:elastic/kibana into new_slo_plugin
mgiota Mar 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ module.exports = {
'x-pack/plugins/observability_solution/observability/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/observability_solution/exploratory_view/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/observability_solution/ux/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/observability_solution/slo/**/*.{js,mjs,ts,tsx}',
],
rules: {
'no-console': ['warn', { allow: ['error'] }],
Expand All @@ -897,6 +898,7 @@ module.exports = {
'x-pack/plugins/observability_solution/apm/**/*.stories.*',
'x-pack/plugins/observability_solution/observability/**/*.stories.*',
'x-pack/plugins/observability_solution/exploratory_view/**/*.stories.*',
'x-pack/plugins/observability_solution/slo/**/*.stories.*',
],
rules: {
'react/function-component-definition': [
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ packages/shared-ux/router/types @elastic/appex-sharedux
packages/shared-ux/storybook/config @elastic/appex-sharedux
packages/shared-ux/storybook/mock @elastic/appex-sharedux
packages/kbn-shared-ux-utility @elastic/appex-sharedux
x-pack/plugins/observability_solution/slo @elastic/obs-ux-management-team
x-pack/packages/kbn-slo-schema @elastic/obs-ux-management-team
x-pack/plugins/snapshot_restore @elastic/kibana-management
packages/solution-nav/es @elastic/appex-sharedux
Expand Down
5 changes: 4 additions & 1 deletion config/serverless.oblt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ xpack.infra.enabled: true
xpack.uptime.enabled: true
xpack.securitySolution.enabled: false

## Enable the slo plugin
xpack.slo.enabled: true

## Cloud settings
xpack.cloud.serverless.project_type: observability

## Enable the Serverless Observability plugin
xpack.serverless.observability.enabled: true
xpack.serverless.observability.enabled: true

## Configure plugins

Expand Down
4 changes: 4 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,10 @@ It leverages universal configuration and other APIs in the serverless plugin to
|Session View is meant to provide a visualization into what is going on in a particular Linux environment where the agent is running. It looks likes a terminal emulator; however, it is a tool for introspecting process activity and understanding user and service behaviour in your Linux servers and infrastructure. It is a time-ordered series of process executions displayed in a tree over time.
|{kib-repo}blob/{branch}/x-pack/plugins/observability_solution/slo/README.md[slo]
|A Kibana plugin
|{kib-repo}blob/{branch}/x-pack/plugins/snapshot_restore/README.md[snapshotRestore]
|or
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@
"@kbn/shared-ux-storybook-config": "link:packages/shared-ux/storybook/config",
"@kbn/shared-ux-storybook-mock": "link:packages/shared-ux/storybook/mock",
"@kbn/shared-ux-utility": "link:packages/kbn-shared-ux-utility",
"@kbn/slo-plugin": "link:x-pack/plugins/observability_solution/slo",
"@kbn/slo-schema": "link:x-pack/packages/kbn-slo-schema",
"@kbn/snapshot-restore-plugin": "link:x-pack/plugins/snapshot_restore",
"@kbn/solution-nav-es": "link:packages/solution-nav/es",
Expand Down
2 changes: 2 additions & 0 deletions packages/deeplinks/observability/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ export const APM_APP_ID = 'apm';
export const SYNTHETICS_APP_ID = 'synthetics';

export const OBSERVABILITY_ONBOARDING_APP_ID = 'observabilityOnboarding';

export const SLO_APP_ID = 'slo';
13 changes: 9 additions & 4 deletions packages/deeplinks/observability/deep_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
OBSERVABILITY_ONBOARDING_APP_ID,
OBSERVABILITY_OVERVIEW_APP_ID,
SYNTHETICS_APP_ID,
SLO_APP_ID,
} from './constants';

type LogsApp = typeof LOGS_APP_ID;
Expand All @@ -23,6 +24,7 @@ type MetricsApp = typeof METRICS_APP_ID;
type ApmApp = typeof APM_APP_ID;
type SyntheticsApp = typeof SYNTHETICS_APP_ID;
type ObservabilityOnboardingApp = typeof OBSERVABILITY_ONBOARDING_APP_ID;
type SLO_APP = typeof SLO_APP_ID;

export type AppId =
| LogsApp
Expand All @@ -31,7 +33,8 @@ export type AppId =
| ObservabilityOnboardingApp
| ApmApp
| MetricsApp
| SyntheticsApp;
| SyntheticsApp
| SLO_APP;

export type LogsLinkId = 'log-categories' | 'settings' | 'anomalies' | 'stream';

Expand All @@ -40,8 +43,7 @@ export type ObservabilityOverviewLinkId =
| 'cases'
| 'cases_configure'
| 'cases_create'
| 'rules'
| 'slos';
| 'rules';

export type MetricsLinkId =
| 'inventory'
Expand All @@ -61,12 +63,15 @@ export type ApmLinkId =

export type SyntheticsLinkId = 'certificates' | 'overview';

export type SLOLinkId = 'slo';

export type LinkId =
| LogsLinkId
| ObservabilityOverviewLinkId
| MetricsLinkId
| ApmLinkId
| SyntheticsLinkId;
| SyntheticsLinkId
| SLOLinkId;

export type DeepLinkId =
| AppId
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-babel-preset/styled_components_files.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
USES_STYLED_COMPONENTS: [
/packages[\/\\]kbn-ui-shared-deps-(npm|src)[\/\\]/,
/src[\/\\]plugins[\/\\](kibana_react)[\/\\]/,
/x-pack[\/\\]plugins[\/\\](observability_solution\/apm|beats_management|cases|fleet|observability_solution\/infra|lists|observability_solution\/observability|observability_solution\/observability_shared|observability_solution\/exploratory_view|security_solution|timelines|observability_solution\/synthetics|observability_solution\/ux|observability_solution\/uptime)[\/\\]/,
/x-pack[\/\\]plugins[\/\\](observability_solution\/apm|beats_management|cases|fleet|observability_solution\/infra|lists|observability_solution\/observability|observability_solution\/observability_shared|observability_solution\/exploratory_view|observability_solution\/slo|security_solution|timelines|observability_solution\/synthetics|observability_solution\/ux|observability_solution\/uptime)[\/\\]/,
/x-pack[\/\\]test[\/\\]plugin_functional[\/\\]plugins[\/\\]resolver_test[\/\\]/,
/x-pack[\/\\]packages[\/\\]elastic_assistant[\/\\]/,
/x-pack[\/\\]packages[\/\\]security-solution[\/\\]ecs_data_quality_dashboard[\/\\]/,
Expand Down
3 changes: 2 additions & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pageLoadAssetSize:
navigation: 37269
newsfeed: 42228
noDataPage: 5000
observability: 115443
observability: 167673
observabilityAIAssistant: 58230
observabilityAIAssistantApp: 27680
observabilityLogsExplorer: 46650
Expand Down Expand Up @@ -136,6 +136,7 @@ pageLoadAssetSize:
serverlessSearch: 72995
sessionView: 77750
share: 71239
slo: 37039
snapshotRestore: 79032
spaces: 57868
stackAlerts: 58316
Expand Down
1 change: 1 addition & 0 deletions src/dev/storybook/aliases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const storybookAliases = {
security_solution_packages: 'x-pack/packages/security-solution/storybook/config',
serverless: 'packages/serverless/storybook/config',
shared_ux: 'packages/shared-ux/storybook/config',
slo: 'x-pack/plugins/observability_solution/slo/.storybook',
threat_intelligence: 'x-pack/plugins/threat_intelligence/.storybook',
triggers_actions_ui: 'x-pack/plugins/triggers_actions_ui/.storybook',
ui_actions_enhanced: 'src/plugins/ui_actions_enhanced/.storybook',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export const applicationUsageSchema = {
'exploratory-view': commonSchema,
osquery: commonSchema,
profiling: commonSchema,
slo: commonSchema,
security_account: commonSchema,
reportingRedirect: commonSchema,
security_access_agreement: commonSchema,
Expand Down
131 changes: 131 additions & 0 deletions src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -5635,6 +5635,137 @@
}
}
},
"slo": {
"properties": {
"appId": {
"type": "keyword",
"_meta": {
"description": "The application being tracked"
}
},
"viewId": {
"type": "keyword",
"_meta": {
"description": "Always `main`"
}
},
"clicks_total": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application since we started counting them"
Copy link
Contributor

@TinaHeiligers TinaHeiligers Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "General number of clicks in the application since we started counting them"
"description": "Total number of clicks in the application since we started counting them"

"General" is too vague, one doesn't know if it's an average, weighted average, or something else.

The same comment holds for the other descriptions using the term "General"

Copy link
Contributor Author

@mgiota mgiota Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TinaHeiligers Thanks I updated the descriptions accordingly, replacing General with Total as per your suggestion

Since these descriptions were generated after I ran node scripts/telemetry_check --fix, I updated the default description in the common schema.

Btw do you know where I can check in Kibana the generated telemetry? Here's how I used to do it in the past, but it doesn't work this way now

To manually test your changes, you can go to Stack Management > Advanced Settings > bottom of the page Usage Data. Then click on "cluster data" to fetch an example of the telemetry that Kibana will send

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#132006 (comment) how I used to do it in the past, but it doesn't work this way now

oh, that's news to me. What doesn't work? Is the button missing, are your fields not there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stack Management > Advanced Settings > bottom of the page Usage Data

I don't see anything about Usage Data under Advanced Settings. How can I test the telemetry that will be sent while I navigate to the SLO app?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw after me applying the change regarding Renaming General to Total CI complains and wants me to update all descriptions. I did the change in this commit (not manual, I simply ran node scripts/telemetry_check --fix ). Is it fine or do you want me to revert back to General?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Usage collection section moved to the "Global Settings" tab in Advanced Settings:

Screenshot 2024-03-12 at 14 34 17 Screenshot 2024-03-12 at 14 31 28 Screenshot 2024-03-12 at 14 31 57

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! That's what I was searching for, thanks!

Regarding my question here, is it fine?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About those descriptions: It looks like other applications also use the "General" term. Maybe it's best to keep them as you had.

Up to you thought, these are for internal use.

Telemetry related changes LGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, I kept them as before. Thanks!

}
},
"clicks_7_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 7 days"
}
},
"clicks_30_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 30 days"
}
},
"clicks_90_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 90 days"
}
},
"minutes_on_screen_total": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen since we started counting them."
}
},
"minutes_on_screen_7_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 7 days"
}
},
"minutes_on_screen_30_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 30 days"
}
},
"minutes_on_screen_90_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 90 days"
}
},
"views": {
"type": "array",
"items": {
"properties": {
"appId": {
"type": "keyword",
"_meta": {
"description": "The application being tracked"
}
},
"viewId": {
"type": "keyword",
"_meta": {
"description": "The application view being tracked"
}
},
"clicks_total": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application sub view since we started counting them"
}
},
"clicks_7_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 7 days"
}
},
"clicks_30_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 30 days"
}
},
"clicks_90_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 90 days"
}
},
"minutes_on_screen_total": {
"type": "float",
"_meta": {
"description": "Minutes the application sub view is active and on-screen since we started counting them."
}
},
"minutes_on_screen_7_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 7 days"
}
},
"minutes_on_screen_30_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 30 days"
}
},
"minutes_on_screen_90_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 90 days"
}
}
}
}
}
}
},
"security_account": {
"properties": {
"appId": {
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,8 @@
"@kbn/shared-ux-storybook-mock/*": ["packages/shared-ux/storybook/mock/*"],
"@kbn/shared-ux-utility": ["packages/kbn-shared-ux-utility"],
"@kbn/shared-ux-utility/*": ["packages/kbn-shared-ux-utility/*"],
"@kbn/slo-plugin": ["x-pack/plugins/observability_solution/slo"],
"@kbn/slo-plugin/*": ["x-pack/plugins/observability_solution/slo/*"],
"@kbn/slo-schema": ["x-pack/packages/kbn-slo-schema"],
"@kbn/slo-schema/*": ["x-pack/packages/kbn-slo-schema/*"],
"@kbn/snapshot-restore-plugin": ["x-pack/plugins/snapshot_restore"],
Expand Down
1 change: 1 addition & 0 deletions x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
"xpack.securitySolutionEss": "plugins/security_solution_ess",
"xpack.securitySolutionServerless": "plugins/security_solution_serverless",
"xpack.sessionView": "plugins/session_view",
"xpack.slo": "plugins/observability_solution/slo",
"xpack.snapshotRestore": "plugins/snapshot_restore",
"xpack.spaces": "plugins/spaces",
"xpack.savedObjectsTagging": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,14 @@
* 2.0.
*/

import { i18n } from '@kbn/i18n';
import { AlertConsumers } from '@kbn/rule-data-utils';
import type { ValidFeatureId } from '@kbn/rule-data-utils';
import type { RuleCreationValidConsumer } from '@kbn/triggers-actions-ui-plugin/public';

export const SLO_BURN_RATE_RULE_TYPE_ID = 'slo.rules.burnRate';

export const INVALID_EQUATION_REGEX = /[^A-Z|+|\-|\s|\d+|\.|\(|\)|\/|\*|>|<|=|\?|\:|&|\!|\|]+/g;
export const ALERT_STATUS_ALL = 'all';
export const ALERTS_URL_STORAGE_KEY = '_a';

export const ALERT_ACTION_ID = 'slo.burnRate.alert';
export const ALERT_ACTION = {
id: ALERT_ACTION_ID,
name: i18n.translate('xpack.observability.slo.alerting.burnRate.alertAction', {
defaultMessage: 'Critical',
}),
};

export const HIGH_PRIORITY_ACTION_ID = 'slo.burnRate.high';
export const HIGH_PRIORITY_ACTION = {
id: HIGH_PRIORITY_ACTION_ID,
name: i18n.translate('xpack.observability.slo.alerting.burnRate.highPriorityAction', {
defaultMessage: 'High',
}),
};

export const MEDIUM_PRIORITY_ACTION_ID = 'slo.burnRate.medium';
export const MEDIUM_PRIORITY_ACTION = {
id: MEDIUM_PRIORITY_ACTION_ID,
name: i18n.translate('xpack.observability.slo.alerting.burnRate.mediumPriorityAction', {
defaultMessage: 'Medium',
}),
};

export const LOW_PRIORITY_ACTION_ID = 'slo.burnRate.low';
export const LOW_PRIORITY_ACTION = {
id: LOW_PRIORITY_ACTION_ID,
name: i18n.translate('xpack.observability.slo.alerting.burnRate.lowPriorityAction', {
defaultMessage: 'Low',
}),
};

export const observabilityAlertFeatureIds: ValidFeatureId[] = [
AlertConsumers.APM,
AlertConsumers.INFRASTRUCTURE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ export {
getProbabilityFromProgressiveLoadingQuality,
} from './progressive_loading';

export const sloFeatureId = 'slo';
export const casesFeatureId = 'observabilityCases';

export const sloFeatureId = 'slo';
// The ID of the observability app. Should more appropriately be called
// 'observability' but it's used in telemetry by applicationUsage so we don't
// want to change it.
Expand All @@ -87,3 +86,5 @@ export const sloListLocatorID = 'SLO_LIST_LOCATOR';
import { paths } from './locators/paths';
export const observabilityPaths = paths.observability;
export type { AlertsLocatorParams } from './locators/alerts';
export { AlertsLocatorDefinition } from './locators/alerts';
export { observabilityAlertFeatureIds } from './constants';
Loading