Skip to content

Commit 23516f2

Browse files
Merge branch 'master' into dev/import-dashboard-url-generator-directly
2 parents 18935b8 + 8483574 commit 23516f2

File tree

3,157 files changed

+51502
-16816
lines changed

Some content is hidden

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

3,157 files changed

+51502
-16816
lines changed

.ci/end2end.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pipeline {
1313
BASE_DIR = 'src/github.com/elastic/kibana'
1414
HOME = "${env.WORKSPACE}"
1515
APM_ITS = 'apm-integration-testing'
16-
CYPRESS_DIR = 'x-pack/legacy/plugins/apm/e2e'
16+
CYPRESS_DIR = 'x-pack/plugins/apm/e2e'
1717
PIPELINE_LOG_LEVEL = 'DEBUG'
1818
}
1919
options {
@@ -39,7 +39,7 @@ pipeline {
3939
shallow: false, reference: "/var/lib/jenkins/.git-references/kibana.git")
4040
script {
4141
dir("${BASE_DIR}"){
42-
def regexps =[ "^x-pack/legacy/plugins/apm/.*" ]
42+
def regexps =[ "^x-pack/plugins/apm/.*" ]
4343
env.APM_UPDATED = isGitRegionMatch(patterns: regexps)
4444
}
4545
}

.ci/es-snapshots/Jenkinsfile_verify_es

Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,42 +19,48 @@ currentBuild.description = "ES: ${SNAPSHOT_VERSION}<br />Kibana: ${params.branch
1919

2020
def SNAPSHOT_MANIFEST = "https://storage.googleapis.com/kibana-ci-es-snapshots-daily/${SNAPSHOT_VERSION}/archives/${SNAPSHOT_ID}/manifest.json"
2121

22-
kibanaPipeline(timeoutMinutes: 120) {
22+
kibanaPipeline(timeoutMinutes: 150) {
2323
catchErrors {
24-
withEnv(["ES_SNAPSHOT_MANIFEST=${SNAPSHOT_MANIFEST}"]) {
25-
parallel([
26-
'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
27-
'x-pack-intake-agent': workers.intake('x-pack-intake', './test/scripts/jenkins_xpack.sh'),
28-
'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
29-
'oss-ciGroup1': kibanaPipeline.ossCiGroupProcess(1),
30-
'oss-ciGroup2': kibanaPipeline.ossCiGroupProcess(2),
31-
'oss-ciGroup3': kibanaPipeline.ossCiGroupProcess(3),
32-
'oss-ciGroup4': kibanaPipeline.ossCiGroupProcess(4),
33-
'oss-ciGroup5': kibanaPipeline.ossCiGroupProcess(5),
34-
'oss-ciGroup6': kibanaPipeline.ossCiGroupProcess(6),
35-
'oss-ciGroup7': kibanaPipeline.ossCiGroupProcess(7),
36-
'oss-ciGroup8': kibanaPipeline.ossCiGroupProcess(8),
37-
'oss-ciGroup9': kibanaPipeline.ossCiGroupProcess(9),
38-
'oss-ciGroup10': kibanaPipeline.ossCiGroupProcess(10),
39-
'oss-ciGroup11': kibanaPipeline.ossCiGroupProcess(11),
40-
'oss-ciGroup12': kibanaPipeline.ossCiGroupProcess(12),
41-
]),
42-
'kibana-xpack-agent': workers.functional('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
43-
'xpack-ciGroup1': kibanaPipeline.xpackCiGroupProcess(1),
44-
'xpack-ciGroup2': kibanaPipeline.xpackCiGroupProcess(2),
45-
'xpack-ciGroup3': kibanaPipeline.xpackCiGroupProcess(3),
46-
'xpack-ciGroup4': kibanaPipeline.xpackCiGroupProcess(4),
47-
'xpack-ciGroup5': kibanaPipeline.xpackCiGroupProcess(5),
48-
'xpack-ciGroup6': kibanaPipeline.xpackCiGroupProcess(6),
49-
'xpack-ciGroup7': kibanaPipeline.xpackCiGroupProcess(7),
50-
'xpack-ciGroup8': kibanaPipeline.xpackCiGroupProcess(8),
51-
'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9),
52-
'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
53-
]),
54-
])
55-
}
24+
slackNotifications.onFailure(
25+
title: ":broken_heart: *<${env.BUILD_URL}|[${SNAPSHOT_VERSION}] ES Snapshot Verification Failure>*",
26+
message: ":broken_heart: [${SNAPSHOT_VERSION}] ES Snapshot Verification Failure",
27+
) {
28+
retryable.enable(2)
29+
withEnv(["ES_SNAPSHOT_MANIFEST=${SNAPSHOT_MANIFEST}"]) {
30+
parallel([
31+
'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
32+
'x-pack-intake-agent': workers.intake('x-pack-intake', './test/scripts/jenkins_xpack.sh'),
33+
'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
34+
'oss-ciGroup1': kibanaPipeline.ossCiGroupProcess(1),
35+
'oss-ciGroup2': kibanaPipeline.ossCiGroupProcess(2),
36+
'oss-ciGroup3': kibanaPipeline.ossCiGroupProcess(3),
37+
'oss-ciGroup4': kibanaPipeline.ossCiGroupProcess(4),
38+
'oss-ciGroup5': kibanaPipeline.ossCiGroupProcess(5),
39+
'oss-ciGroup6': kibanaPipeline.ossCiGroupProcess(6),
40+
'oss-ciGroup7': kibanaPipeline.ossCiGroupProcess(7),
41+
'oss-ciGroup8': kibanaPipeline.ossCiGroupProcess(8),
42+
'oss-ciGroup9': kibanaPipeline.ossCiGroupProcess(9),
43+
'oss-ciGroup10': kibanaPipeline.ossCiGroupProcess(10),
44+
'oss-ciGroup11': kibanaPipeline.ossCiGroupProcess(11),
45+
'oss-ciGroup12': kibanaPipeline.ossCiGroupProcess(12),
46+
]),
47+
'kibana-xpack-agent': workers.functional('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
48+
'xpack-ciGroup1': kibanaPipeline.xpackCiGroupProcess(1),
49+
'xpack-ciGroup2': kibanaPipeline.xpackCiGroupProcess(2),
50+
'xpack-ciGroup3': kibanaPipeline.xpackCiGroupProcess(3),
51+
'xpack-ciGroup4': kibanaPipeline.xpackCiGroupProcess(4),
52+
'xpack-ciGroup5': kibanaPipeline.xpackCiGroupProcess(5),
53+
'xpack-ciGroup6': kibanaPipeline.xpackCiGroupProcess(6),
54+
'xpack-ciGroup7': kibanaPipeline.xpackCiGroupProcess(7),
55+
'xpack-ciGroup8': kibanaPipeline.xpackCiGroupProcess(8),
56+
'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9),
57+
'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
58+
]),
59+
])
60+
}
5661

57-
promoteSnapshot(SNAPSHOT_VERSION, SNAPSHOT_ID)
62+
promoteSnapshot(SNAPSHOT_VERSION, SNAPSHOT_ID)
63+
}
5864
}
5965

6066
kibanaPipeline.sendMail()

.eslintignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ target
2525
/src/plugins/vis_type_timelion/public/_generated_/**
2626
/src/plugins/vis_type_timelion/public/webpackShims/jquery.flot.*
2727
/x-pack/legacy/plugins/**/__tests__/fixtures/**
28-
/x-pack/legacy/plugins/apm/e2e/cypress/**/snapshots.js
29-
/x-pack/legacy/plugins/canvas/canvas_plugin
30-
/x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts
31-
/x-pack/legacy/plugins/canvas/shareable_runtime/build
32-
/x-pack/legacy/plugins/canvas/storybook
28+
/x-pack/plugins/apm/e2e/cypress/**/snapshots.js
29+
/x-pack/plugins/canvas/canvas_plugin
30+
/x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts
31+
/x-pack/plugins/canvas/shareable_runtime/build
32+
/x-pack/plugins/canvas/storybook
3333
/x-pack/plugins/monitoring/public/lib/jquery_flot
3434
/x-pack/legacy/plugins/infra/common/graphql/types.ts
3535
/x-pack/legacy/plugins/infra/public/graphql/types.ts

.eslintrc.js

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ module.exports = {
8989
},
9090
},
9191
{
92-
files: ['x-pack/legacy/plugins/canvas/**/*.{js,ts,tsx}'],
92+
files: ['x-pack/plugins/canvas/**/*.{js,ts,tsx}'],
9393
rules: {
9494
'react-hooks/exhaustive-deps': 'off',
9595
'jsx-a11y/click-events-have-key-events': 'off',
@@ -151,6 +151,16 @@ module.exports = {
151151
},
152152
},
153153

154+
/**
155+
* New Platform client-side
156+
*/
157+
{
158+
files: ['{src,x-pack}/plugins/*/public/**/*.{js,ts,tsx}'],
159+
rules: {
160+
'import/no-commonjs': 'error',
161+
},
162+
},
163+
154164
/**
155165
* Files that require Elastic license headers instead of Apache 2.0 header
156166
*/
@@ -183,6 +193,11 @@ module.exports = {
183193
{
184194
basePath: __dirname,
185195
zones: [
196+
{
197+
target: ['(src|x-pack)/**/*', '!src/core/**/*'],
198+
from: ['src/core/utils/**/*'],
199+
errorMessage: `Plugins may only import from src/core/server and src/core/public.`,
200+
},
186201
{
187202
target: [
188203
'(src|x-pack)/legacy/**/*',
@@ -306,7 +321,7 @@ module.exports = {
306321
{
307322
files: [
308323
'x-pack/test/functional/apps/**/*.js',
309-
'x-pack/legacy/plugins/apm/**/*.js',
324+
'x-pack/plugins/apm/**/*.js',
310325
'test/*/config.ts',
311326
'test/*/config_open.ts',
312327
'test/*/{tests,test_suites,apis,apps}/**/*',
@@ -393,7 +408,7 @@ module.exports = {
393408
'x-pack/**/*.test.js',
394409
'x-pack/test_utils/**/*',
395410
'x-pack/gulpfile.js',
396-
'x-pack/legacy/plugins/apm/public/utils/testHelpers.js',
411+
'x-pack/plugins/apm/public/utils/testHelpers.js',
397412
],
398413
rules: {
399414
'import/no-extraneous-dependencies': [
@@ -519,15 +534,15 @@ module.exports = {
519534
* APM overrides
520535
*/
521536
{
522-
files: ['x-pack/legacy/plugins/apm/**/*.js'],
537+
files: ['x-pack/plugins/apm/**/*.js'],
523538
rules: {
524539
'no-unused-vars': ['error', { ignoreRestSiblings: true }],
525540
'no-console': ['warn', { allow: ['error'] }],
526541
},
527542
},
528543
{
529544
plugins: ['react-hooks'],
530-
files: ['x-pack/legacy/plugins/apm/**/*.{ts,tsx}'],
545+
files: ['x-pack/plugins/apm/**/*.{ts,tsx}'],
531546
rules: {
532547
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
533548
'react-hooks/exhaustive-deps': ['error', { additionalHooks: '^useFetcher$' }],
@@ -878,7 +893,7 @@ module.exports = {
878893
* Canvas overrides
879894
*/
880895
{
881-
files: ['x-pack/legacy/plugins/canvas/**/*.js'],
896+
files: ['x-pack/plugins/canvas/**/*.js'],
882897
rules: {
883898
radix: 'error',
884899

@@ -922,12 +937,12 @@ module.exports = {
922937
},
923938
{
924939
files: [
925-
'x-pack/legacy/plugins/canvas/gulpfile.js',
926-
'x-pack/legacy/plugins/canvas/scripts/*.js',
927-
'x-pack/legacy/plugins/canvas/tasks/*.js',
928-
'x-pack/legacy/plugins/canvas/tasks/**/*.js',
929-
'x-pack/legacy/plugins/canvas/__tests__/**/*.js',
930-
'x-pack/legacy/plugins/canvas/**/{__tests__,__test__,__jest__,__fixtures__,__mocks__}/**/*.js',
940+
'x-pack/plugins/canvas/gulpfile.js',
941+
'x-pack/plugins/canvas/scripts/*.js',
942+
'x-pack/plugins/canvas/tasks/*.js',
943+
'x-pack/plugins/canvas/tasks/**/*.js',
944+
'x-pack/plugins/canvas/__tests__/**/*.js',
945+
'x-pack/plugins/canvas/**/{__tests__,__test__,__jest__,__fixtures__,__mocks__}/**/*.js',
931946
],
932947
rules: {
933948
'import/no-extraneous-dependencies': [
@@ -940,7 +955,7 @@ module.exports = {
940955
},
941956
},
942957
{
943-
files: ['x-pack/legacy/plugins/canvas/canvas_plugin_src/**/*.js'],
958+
files: ['x-pack/plugins/canvas/canvas_plugin_src/**/*.js'],
944959
globals: { canvas: true, $: true },
945960
rules: {
946961
'import/no-unresolved': [
@@ -952,13 +967,13 @@ module.exports = {
952967
},
953968
},
954969
{
955-
files: ['x-pack/legacy/plugins/canvas/public/**/*.js'],
970+
files: ['x-pack/plugins/canvas/public/**/*.js'],
956971
env: {
957972
browser: true,
958973
},
959974
},
960975
{
961-
files: ['x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts/**/*.js'],
976+
files: ['x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts/**/*.js'],
962977
env: {
963978
jquery: true,
964979
},

.github/CODEOWNERS

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
/x-pack/plugins/graph/ @elastic/kibana-app
99
/src/legacy/server/url_shortening/ @elastic/kibana-app
1010
/src/legacy/server/sample_data/ @elastic/kibana-app
11-
/src/legacy/core_plugins/kibana/public/dashboard/ @elastic/kibana-app
12-
/src/legacy/core_plugins/kibana/public/discover/ @elastic/kibana-app
1311
/src/legacy/core_plugins/kibana/public/local_application_service/ @elastic/kibana-app
1412
/src/legacy/core_plugins/kibana/public/dev_tools/ @elastic/kibana-app
1513
/src/plugins/dashboard/ @elastic/kibana-app
@@ -68,7 +66,7 @@
6866
/x-pack/plugins/drilldowns/ @elastic/kibana-app-arch
6967

7068
# APM
71-
/x-pack/legacy/plugins/apm/ @elastic/apm-ui
69+
/x-pack/plugins/apm/ @elastic/apm-ui
7270
/x-pack/plugins/apm/ @elastic/apm-ui
7371
/x-pack/test/functional/apps/apm/ @elastic/apm-ui
7472
/src/legacy/core_plugins/apm_oss/ @elastic/apm-ui
@@ -79,7 +77,7 @@
7977
/x-pack/legacy/plugins/beats_management/ @elastic/beats
8078

8179
# Canvas
82-
/x-pack/legacy/plugins/canvas/ @elastic/kibana-canvas
80+
/x-pack/plugins/canvas/ @elastic/kibana-canvas
8381

8482
# Observability UIs
8583
/x-pack/legacy/plugins/infra/ @elastic/logs-metrics-ui

.github/paths-labeller.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
- "Feature:ExpressionLanguage":
99
- "src/plugins/expressions/**/*.*"
1010
- "src/plugins/bfetch/**/*.*"
11-
- "Team:apm"
11+
- "Team:apm":
12+
- "x-pack/plugins/apm/**/*.*"
1213
- "x-pack/plugins/apm/**/*.*"
13-
- "x-pack/legacy/plugins/apm/**/*.*"
1414
- "Team:uptime":
1515
- "x-pack/plugins/uptime/**/*.*"
16-
- "x-pack/legacy/plugins/uptime/**/*.*"

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ package-lock.json
4444
*.sublime-*
4545
npm-debug.log*
4646
.tern-project
47-
x-pack/legacy/plugins/apm/tsconfig.json
47+
x-pack/plugins/apm/tsconfig.json
4848
apm.tsconfig.json
49-
/x-pack/legacy/plugins/apm/e2e/snapshots.js
49+
/x-pack/plugins/apm/e2e/snapshots.js

.sass-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ files:
55
- 'src/plugins/vis_type_vislib/**/*.s+(a|c)ss'
66
- 'src/plugins/vis_type_xy/**/*.s+(a|c)ss'
77
- 'x-pack/legacy/plugins/security/**/*.s+(a|c)ss'
8-
- 'x-pack/legacy/plugins/canvas/**/*.s+(a|c)ss'
8+
- 'x-pack/plugins/canvas/**/*.s+(a|c)ss'
99
- 'x-pack/plugins/triggers_actions_ui/**/*.s+(a|c)ss'
1010
- 'x-pack/plugins/lens/**/*.s+(a|c)ss'
1111
- 'x-pack/plugins/cross_cluster_replication/**/*.s+(a|c)ss'
1212
- 'x-pack/legacy/plugins/maps/**/*.s+(a|c)ss'
1313
- 'x-pack/plugins/maps/**/*.s+(a|c)ss'
1414
ignore:
15-
- 'x-pack/legacy/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss'
15+
- 'x-pack/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss'
1616
rules:
1717
quotes:
1818
- 2

config/kibana.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# the username and password that the Kibana server uses to perform maintenance on the Kibana
4141
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
4242
# is proxied through the Kibana server.
43-
#elasticsearch.username: "kibana"
43+
#elasticsearch.username: "kibana_system"
4444
#elasticsearch.password: "pass"
4545

4646
# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.

docs/apm/spans.asciidoc

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,53 @@
11
[role="xpack"]
22
[[spans]]
3-
=== Span timeline
3+
=== Trace sample timeline
44

5-
TIP: A {apm-overview-ref-v}/transaction-spans.html[span] is the duration of a single event.
6-
Spans are automatically captured by APM agents, and you can also define custom spans.
7-
Each span has a type and is defined by a different color in the timeline/waterfall visualization.
8-
9-
The span timeline visualization is a bird's-eye view of what your application was doing while it was trying to respond to the request that came in.
5+
The trace sample timeline visualization is a bird's-eye view of what your application was doing while it was trying to respond to a request.
106
This makes it useful for visualizing where the selected transaction spent most of its time.
117

128
[role="screenshot"]
139
image::apm/images/apm-transaction-sample.png[Example of distributed trace colors in the APM app in Kibana]
1410

1511
View a span in detail by clicking on it in the timeline waterfall.
16-
When you click on an SQL Select database query,
12+
For example, when you click on an SQL Select database query,
1713
the information displayed includes the actual SQL that was executed, how long it took,
1814
and the percentage of the trace's total time.
1915
You also get a stack trace, which shows the SQL query in your code.
2016
Finally, APM knows which files are your code and which are just modules or libraries that you've installed.
2117
These library frames will be minimized by default in order to show you the most relevant stack trace.
2218

19+
TIP: A {apm-overview-ref-v}/transaction-spans.html[span] is the duration of a single event.
20+
Spans are automatically captured by APM agents, and you can also define custom spans.
21+
Each span has a type and is defined by a different color in the timeline/waterfall visualization.
22+
2323
[role="screenshot"]
2424
image::apm/images/apm-span-detail.png[Example view of a span detail in the APM app in Kibana]
2525

26-
If your span timeline is colorful, it's indicative of a <<distributed-tracing,distributed trace>>.
26+
[float]
27+
[[distributed-tracing]]
28+
==== Distributed tracing
29+
30+
If your trace sample timeline is colorful, it's indicative of a distributed trace.
2731
Services in a distributed trace are separated by color and listed in the order they occur.
2832

2933
[role="screenshot"]
3034
image::apm/images/apm-services-trace.png[Example of distributed trace colors in the APM app in Kibana]
3135

32-
Don't forget; a distributed trace includes more than one transaction.
36+
As application architectures are shifting from monolithic to more distributed, service-based architectures,
37+
distributed tracing has become a crucial feature of modern application performance monitoring.
38+
It allows you to trace requests through your service architecture automatically, and visualize those traces in one single view in the APM app.
39+
From initial web requests to your front-end service, to queries made to your back-end services,
40+
this makes finding possible bottlenecks throughout your application much easier and faster.
41+
42+
[role="screenshot"]
43+
image::apm/images/apm-distributed-tracing.png[Example view of the distributed tracing in APM app in Kibana]
44+
45+
Don't forget; by definition, a distributed trace includes more than one transaction.
3346
When viewing these distributed traces in the timeline waterfall, you'll see this image:apm/images/transaction-icon.png[APM icon] icon,
3447
which indicates the next transaction in the trace.
3548
These transactions can be expanded and viewed in detail by clicking on them.
3649

3750
After exploring these traces,
3851
you can return to the full trace by clicking *View full trace*.
52+
53+
TIP: Distributed tracing is supported by all APM agents, and there's no additional configuration needed.

0 commit comments

Comments
 (0)