Skip to content

Commit 0888b2d

Browse files
Merge branch 'master' into generator-refactor
2 parents 544e1f3 + 518e88c commit 0888b2d

1,224 files changed

Lines changed: 58070 additions & 15432 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/Jenkinsfile_coverage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ def handleIngestion(timestamp) {
2828
kibanaCoverage.collectVcsInfo("### Collect VCS Info")
2929
kibanaCoverage.generateReports("### Merge coverage reports")
3030
kibanaCoverage.uploadCombinedReports()
31-
kibanaCoverage.ingest(timestamp, '### Injest && Upload')
31+
kibanaCoverage.ingest(env.JOB_NAME, BUILD_NUMBER, BUILD_URL, timestamp, '### Ingest && Upload')
3232
kibanaCoverage.uploadCoverageStaticSite(timestamp)
3333
}
3434

3535
def handleFail() {
3636
def buildStatus = buildUtils.getBuildStatus()
37-
if(params.NOTIFY_ON_FAILURE && buildStatus != 'SUCCESS' && buildStatus != 'ABORTED') {
37+
if(params.NOTIFY_ON_FAILURE && buildStatus != 'SUCCESS' && buildStatus != 'ABORTED' && buildStatus != 'UNSTABLE') {
3838
slackNotifications.sendFailedBuild(
3939
channel: '#kibana-qa',
4040
username: 'Kibana QA'

.eslintrc.js

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -64,63 +64,63 @@ module.exports = {
6464
* Temporarily disable some react rules for specific plugins, remove in separate PRs
6565
*/
6666
{
67-
files: ['packages/kbn-ui-framework/**/*.{js,ts,tsx}'],
67+
files: ['packages/kbn-ui-framework/**/*.{js,mjs,ts,tsx}'],
6868
rules: {
6969
'jsx-a11y/no-onchange': 'off',
7070
},
7171
},
7272
{
73-
files: ['src/plugins/es_ui_shared/**/*.{js,ts,tsx}'],
73+
files: ['src/plugins/es_ui_shared/**/*.{js,mjs,ts,tsx}'],
7474
rules: {
7575
'react-hooks/exhaustive-deps': 'off',
7676
},
7777
},
7878
{
79-
files: ['src/plugins/kibana_react/**/*.{js,ts,tsx}'],
79+
files: ['src/plugins/kibana_react/**/*.{js,mjs,ts,tsx}'],
8080
rules: {
8181
'react-hooks/rules-of-hooks': 'off',
8282
'react-hooks/exhaustive-deps': 'off',
8383
},
8484
},
8585
{
86-
files: ['src/plugins/kibana_utils/**/*.{js,ts,tsx}'],
86+
files: ['src/plugins/kibana_utils/**/*.{js,mjs,ts,tsx}'],
8787
rules: {
8888
'react-hooks/exhaustive-deps': 'off',
8989
},
9090
},
9191
{
92-
files: ['x-pack/plugins/canvas/**/*.{js,ts,tsx}'],
92+
files: ['x-pack/plugins/canvas/**/*.{js,mjs,ts,tsx}'],
9393
rules: {
9494
'jsx-a11y/click-events-have-key-events': 'off',
9595
},
9696
},
9797
{
98-
files: ['x-pack/plugins/cross_cluster_replication/**/*.{js,ts,tsx}'],
98+
files: ['x-pack/plugins/cross_cluster_replication/**/*.{js,mjs,ts,tsx}'],
9999
rules: {
100100
'jsx-a11y/click-events-have-key-events': 'off',
101101
},
102102
},
103103
{
104-
files: ['x-pack/legacy/plugins/index_management/**/*.{js,ts,tsx}'],
104+
files: ['x-pack/legacy/plugins/index_management/**/*.{js,mjs,ts,tsx}'],
105105
rules: {
106106
'react-hooks/exhaustive-deps': 'off',
107107
'react-hooks/rules-of-hooks': 'off',
108108
},
109109
},
110110
{
111-
files: ['x-pack/plugins/lens/**/*.{js,ts,tsx}'],
111+
files: ['x-pack/plugins/lens/**/*.{js,mjs,ts,tsx}'],
112112
rules: {
113113
'react-hooks/exhaustive-deps': 'off',
114114
},
115115
},
116116
{
117-
files: ['x-pack/plugins/ml/**/*.{js,ts,tsx}'],
117+
files: ['x-pack/plugins/ml/**/*.{js,mjs,ts,tsx}'],
118118
rules: {
119119
'react-hooks/exhaustive-deps': 'off',
120120
},
121121
},
122122
{
123-
files: ['x-pack/legacy/plugins/snapshot_restore/**/*.{js,ts,tsx}'],
123+
files: ['x-pack/legacy/plugins/snapshot_restore/**/*.{js,mjs,ts,tsx}'],
124124
rules: {
125125
'react-hooks/exhaustive-deps': 'off',
126126
},
@@ -132,7 +132,7 @@ module.exports = {
132132
* Licence headers
133133
*/
134134
{
135-
files: ['**/*.{js,ts,tsx}', '!plugins/**/*'],
135+
files: ['**/*.{js,mjs,ts,tsx}', '!plugins/**/*'],
136136
rules: {
137137
'@kbn/eslint/require-license-header': [
138138
'error',
@@ -153,7 +153,7 @@ module.exports = {
153153
* New Platform client-side
154154
*/
155155
{
156-
files: ['{src,x-pack}/plugins/*/public/**/*.{js,ts,tsx}'],
156+
files: ['{src,x-pack}/plugins/*/public/**/*.{js,mjs,ts,tsx}'],
157157
rules: {
158158
'import/no-commonjs': 'error',
159159
},
@@ -163,7 +163,7 @@ module.exports = {
163163
* Files that require Elastic license headers instead of Apache 2.0 header
164164
*/
165165
{
166-
files: ['x-pack/**/*.{js,ts,tsx}'],
166+
files: ['x-pack/**/*.{js,mjs,ts,tsx}'],
167167
rules: {
168168
'@kbn/eslint/require-license-header': [
169169
'error',
@@ -184,7 +184,7 @@ module.exports = {
184184
* Restricted paths
185185
*/
186186
{
187-
files: ['**/*.{js,ts,tsx}'],
187+
files: ['**/*.{js,mjs,ts,tsx}'],
188188
rules: {
189189
'@kbn/eslint/no-restricted-paths': [
190190
'error',
@@ -251,8 +251,8 @@ module.exports = {
251251
],
252252
from: [
253253
'(src|x-pack)/plugins/**/(public|server)/**/*',
254-
'!(src|x-pack)/plugins/**/(public|server)/mocks/index.{js,ts}',
255-
'!(src|x-pack)/plugins/**/(public|server)/(index|mocks).{js,ts,tsx}',
254+
'!(src|x-pack)/plugins/**/(public|server)/mocks/index.{js,mjs,ts}',
255+
'!(src|x-pack)/plugins/**/(public|server)/(index|mocks).{js,mjs,ts,tsx}',
256256
],
257257
allowSameFolder: true,
258258
errorMessage: 'Plugins may only import from top-level public and server modules.',
@@ -264,11 +264,11 @@ module.exports = {
264264

265265
'src/legacy/core_plugins/**/*',
266266
'!src/legacy/core_plugins/**/server/**/*',
267-
'!src/legacy/core_plugins/**/index.{js,ts,tsx}',
267+
'!src/legacy/core_plugins/**/index.{js,mjs,ts,tsx}',
268268

269269
'x-pack/legacy/plugins/**/*',
270270
'!x-pack/legacy/plugins/**/server/**/*',
271-
'!x-pack/legacy/plugins/**/index.{js,ts,tsx}',
271+
'!x-pack/legacy/plugins/**/index.{js,mjs,ts,tsx}',
272272

273273
'examples/**/*',
274274
'!examples/**/server/**/*',
@@ -334,6 +334,7 @@ module.exports = {
334334
*/
335335
{
336336
files: [
337+
'x-pack/test/apm_api_integration/**/*.ts',
337338
'x-pack/test/functional/apps/**/*.js',
338339
'x-pack/plugins/apm/**/*.js',
339340
'test/*/config.ts',
@@ -530,7 +531,7 @@ module.exports = {
530531
* Jest specific rules
531532
*/
532533
{
533-
files: ['**/*.test.{js,ts,tsx}'],
534+
files: ['**/*.test.{js,mjs,ts,tsx}'],
534535
rules: {
535536
'jest/valid-describe': 'error',
536537
},
@@ -595,8 +596,8 @@ module.exports = {
595596
{
596597
// front end and common typescript and javascript files only
597598
files: [
598-
'x-pack/plugins/security_solution/public/**/*.{js,ts,tsx}',
599-
'x-pack/plugins/security_solution/common/**/*.{js,ts,tsx}',
599+
'x-pack/plugins/security_solution/public/**/*.{js,mjs,ts,tsx}',
600+
'x-pack/plugins/security_solution/common/**/*.{js,mjs,ts,tsx}',
600601
],
601602
rules: {
602603
'import/no-nodejs-modules': 'error',
@@ -646,7 +647,7 @@ module.exports = {
646647
// {
647648
// // will introduced after the other warns are fixed
648649
// // typescript and javascript for front end react performance
649-
// files: ['x-pack/plugins/security_solution/public/**/!(*.test).{js,ts,tsx}'],
650+
// files: ['x-pack/plugins/security_solution/public/**/!(*.test).{js,mjs,ts,tsx}'],
650651
// plugins: ['react-perf'],
651652
// rules: {
652653
// // 'react-perf/jsx-no-new-object-as-prop': 'error',
@@ -657,7 +658,7 @@ module.exports = {
657658
// },
658659
{
659660
// typescript and javascript for front and back end
660-
files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{js,ts,tsx}'],
661+
files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{js,mjs,ts,tsx}'],
661662
plugins: ['eslint-plugin-node', 'react'],
662663
env: {
663664
mocha: true,
@@ -776,8 +777,8 @@ module.exports = {
776777
{
777778
// front end and common typescript and javascript files only
778779
files: [
779-
'x-pack/plugins/lists/public/**/*.{js,ts,tsx}',
780-
'x-pack/plugins/lists/common/**/*.{js,ts,tsx}',
780+
'x-pack/plugins/lists/public/**/*.{js,mjs,ts,tsx}',
781+
'x-pack/plugins/lists/common/**/*.{js,mjs,ts,tsx}',
781782
],
782783
rules: {
783784
'import/no-nodejs-modules': 'error',
@@ -792,7 +793,7 @@ module.exports = {
792793
},
793794
{
794795
// typescript and javascript for front and back end
795-
files: ['x-pack/plugins/lists/**/*.{js,ts,tsx}'],
796+
files: ['x-pack/plugins/lists/**/*.{js,mjs,ts,tsx}'],
796797
plugins: ['eslint-plugin-node'],
797798
env: {
798799
mocha: true,
@@ -888,7 +889,7 @@ module.exports = {
888889
{
889890
// typescript only for front and back end
890891
files: [
891-
'x-pack/{,legacy/}plugins/{alerting,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}',
892+
'x-pack/{,legacy/}plugins/{alerts,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}',
892893
],
893894
rules: {
894895
'@typescript-eslint/no-explicit-any': 'error',
@@ -1020,8 +1021,8 @@ module.exports = {
10201021
*/
10211022
{
10221023
files: [
1023-
'src/plugins/vis_type_timeseries/**/*.{js,ts,tsx}',
1024-
'src/legacy/core_plugins/vis_type_timeseries/**/*.{js,ts,tsx}',
1024+
'src/plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}',
1025+
'src/legacy/core_plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}',
10251026
],
10261027
rules: {
10271028
'import/no-default-export': 'error',
@@ -1039,5 +1040,22 @@ module.exports = {
10391040
...require('eslint-config-prettier/@typescript-eslint').rules,
10401041
},
10411042
},
1043+
1044+
{
1045+
files: [
1046+
// platform-team owned code
1047+
'src/core/**',
1048+
'x-pack/plugins/features/**',
1049+
'x-pack/plugins/licensing/**',
1050+
'x-pack/plugins/global_search/**',
1051+
'x-pack/plugins/cloud/**',
1052+
'packages/kbn-config-schema',
1053+
'src/plugins/status_page/**',
1054+
'src/plugins/saved_objects_management/**',
1055+
],
1056+
rules: {
1057+
'@typescript-eslint/prefer-ts-expect-error': 'error',
1058+
},
1059+
},
10421060
],
10431061
};

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132

133133
# Quality Assurance
134134
/src/dev/code_coverage @elastic/kibana-qa
135+
/vars/*Coverage.groovy @elastic/kibana-qa
135136
/test/functional/services/common @elastic/kibana-qa
136137
/test/functional/services/lib @elastic/kibana-qa
137138
/test/functional/services/remote @elastic/kibana-qa

docs/apm/apm-alerts.asciidoc

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,20 @@ and enables central management of all alerts from <<management,Kibana Management
1515
[role="screenshot"]
1616
image::apm/images/apm-alert.png[Create an alert in the APM app]
1717

18-
There are two different types of threshold alerts: transaction duration, and error rate.
18+
For a walkthrough of the alert flyout panel, including detailed information on each configurable property,
19+
see Kibana's <<defining-alerts,defining alerts>>.
20+
21+
The APM app supports two different types of threshold alerts: transaction duration, and error rate.
1922
Below, we'll create one of each.
2023

2124
[float]
2225
[[apm-create-transaction-alert]]
2326
=== Create a transaction duration alert
2427

25-
This guide creates an alert for the `opbeans-java` service based on the following criteria:
28+
Transaction duration alerts trigger when the duration of a specific transaction type in a service exceeds a defined threshold.
29+
This guide will create an alert for the `opbeans-java` service based on the following criteria:
2630

31+
* Environment: Production
2732
* Transaction type: `transaction.type:request`
2833
* Average request is above `1500ms` for the last 5 minutes
2934
* Check every 10 minutes, and repeat the alert every 30 minutes
@@ -52,14 +57,22 @@ Enter a name for the connector,
5257
and paste the webhook URL.
5358
See Slack's webhook documentation if you need to create one.
5459

60+
Add a message body in markdown format.
61+
You can use the https://mustache.github.io/[Mustache] template syntax, i.e., `{{variable}}`
62+
to pass alert values at the time a condition is detected to an action.
63+
A list of available variables can be accessed by selecting the
64+
**add variable** button image:apm/images/add-variable.png[add variable button].
65+
5566
Select **Save**. The alert has been created and is now active!
5667

5768
[float]
5869
[[apm-create-error-alert]]
5970
=== Create an error rate alert
6071

72+
Error rate alerts trigger when the number of errors in a service exceeds a defined threshold.
6173
This guide creates an alert for the `opbeans-python` service based on the following criteria:
6274

75+
* Environment: Production
6376
* Error rate is above 25 for the last minute
6477
* Check every 1 minute, and repeat the alert every 10 minutes
6578
* Send the alert via email to the `opbeans-python` team
@@ -81,6 +94,12 @@ Based on the alert criteria, define the following alert details:
8194
Select the **Email** action type and click **Create a connector**.
8295
Fill out the required details: sender, host, port, etc., and click **save**.
8396

97+
Add a message body in markdown format.
98+
You can use the https://mustache.github.io/[Mustache] template syntax, i.e., `{{variable}}`
99+
to pass alert values at the time a condition is detected to an action.
100+
A list of available variables can be accessed by selecting the
101+
**add variable** button image:apm/images/add-variable.png[add variable button].
102+
84103
Select **Save**. The alert has been created and is now active!
85104

86105
[float]

docs/apm/images/add-variable.png

3.95 KB
Loading

0 commit comments

Comments
 (0)