Skip to content

Commit 205e526

Browse files
committed
Merge branch 'master' into alerts/rename-resolved-to-recovered
* master: (119 commits) [Uptime] Fix headers io-ts type (#84089) [fleet] Add config options to accepted docker env vars (#84338) [Fleet] Support URL query state in agent logs UI (#84298) [basePathProxy] include query in redirect (#84356) [Security Solution] Add Endpoint policy feature checks (#83972) Fix issues with show_license_expiration (#84361) [Security Solution][Resolver] Add support for predefined schemas for endpoint and winlogbeat (#84103) [cli/dev] log a warning when --no-base-path is used with --dev (#84354) [Fleet] Support input-level vars & templates (#83878) [APM] Elastic chart issues (#84238) [Time to Visualize] Fix Unlink Action via Rollback of ReplacePanel (#83873) redirect to visualize listing page when by value visualization editor doesn't have a value input (#84287) add live region for field search (#84310) [ML] Persisted URL state for Anomalies table (#84314) [dev/cli] detect worker type using env, not cluster module (#83977) [Workplace Search] Migrate DisplaySettings tree (#84283) Deprecate `xpack.task_manager.index` setting (#84155) [Search] Search batching using bfetch (again) (#84043) Use .kibana instead of .kibana_current to mark migration completion (#83373) [Monitoring] Only look at ES for the missing data alert for now (#83839) ...
2 parents 1a2f687 + f31e7c8 commit 205e526

2,283 files changed

Lines changed: 96737 additions & 103006 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/teamcity/tests/xpack_list_cyclic_dependency.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

.ci/teamcity/tests/xpack_siem_cyclic_dependency.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ snapshots.js
4444
/packages/kbn-ui-framework/doc_site/build
4545
/packages/kbn-ui-framework/generator-kui/*/templates/
4646
/packages/kbn-ui-shared-deps/flot_charts
47+
/packages/kbn-monaco/src/painless/antlr

.i18nrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
],
2929
"maps_legacy": "src/plugins/maps_legacy",
3030
"monaco": "packages/kbn-monaco/src",
31+
"presentationUtil": "src/plugins/presentation_util",
3132
"indexPatternManagement": "src/plugins/index_pattern_management",
3233
"advancedSettings": "src/plugins/advanced_settings",
3334
"kibana_legacy": "src/plugins/kibana_legacy",

.teamcity/src/builds/test/QuickTests.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ object QuickTests : BuildType({
1313

1414
val testScripts = mapOf(
1515
"Test Hardening" to ".ci/teamcity/tests/test_hardening.sh",
16-
"X-Pack List cyclic dependency" to ".ci/teamcity/tests/xpack_list_cyclic_dependency.sh",
17-
"X-Pack SIEM cyclic dependency" to ".ci/teamcity/tests/xpack_siem_cyclic_dependency.sh",
1816
"Test Projects" to ".ci/teamcity/tests/test_projects.sh",
1917
"Mocha Tests" to ".ci/teamcity/tests/mocha.sh"
2018
)

config/kibana.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
# default to `true` starting in Kibana 7.0.
1919
#server.rewriteBasePath: false
2020

21+
# Specifies the public URL at which Kibana is available for end users. If
22+
# `server.basePath` is configured this URL should end with the same basePath.
23+
#server.publicBaseUrl: ""
24+
2125
# The maximum payload size in bytes for incoming server requests.
2226
#server.maxPayloadBytes: 1048576
2327

docs/api/spaces-management/copy_saved_objects.asciidoc

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,17 @@ You can request to overwrite any objects that already exist in the target space
5151
(Optional, boolean) When set to `true`, all saved objects related to the specified saved objects will also be copied into the target
5252
spaces. The default value is `false`.
5353

54+
`createNewCopies`::
55+
(Optional, boolean) Creates new copies of saved objects, regenerates each object ID, and resets the origin. When used, potential conflict
56+
errors are avoided. The default value is `true`.
57+
+
58+
NOTE: This cannot be used with the `overwrite` option.
59+
5460
`overwrite`::
5561
(Optional, boolean) When set to `true`, all conflicts are automatically overidden. When a saved object with a matching `type` and `id`
5662
exists in the target space, that version is replaced with the version from the source space. The default value is `false`.
63+
+
64+
NOTE: This cannot be used with the `createNewCopies` option.
5765

5866
[role="child_attributes"]
5967
[[spaces-api-copy-saved-objects-response-body]]
@@ -128,8 +136,7 @@ $ curl -X POST api/spaces/_copy_saved_objects
128136
"id": "my-dashboard"
129137
}],
130138
"spaces": ["marketing"],
131-
"includeReferences": true,
132-
"createNewcopies": true
139+
"includeReferences": true
133140
}
134141
----
135142
// KIBANA
@@ -193,7 +200,8 @@ $ curl -X POST api/spaces/_copy_saved_objects
193200
"id": "my-dashboard"
194201
}],
195202
"spaces": ["marketing"],
196-
"includeReferences": true
203+
"includeReferences": true,
204+
"createNewCopies": false
197205
}
198206
----
199207
// KIBANA
@@ -254,7 +262,8 @@ $ curl -X POST api/spaces/_copy_saved_objects
254262
"id": "my-dashboard"
255263
}],
256264
"spaces": ["marketing", "sales"],
257-
"includeReferences": true
265+
"includeReferences": true,
266+
"createNewCopies": false
258267
}
259268
----
260269
// KIBANA
@@ -405,7 +414,8 @@ $ curl -X POST api/spaces/_copy_saved_objects
405414
"id": "my-dashboard"
406415
}],
407416
"spaces": ["marketing"],
408-
"includeReferences": true
417+
"includeReferences": true,
418+
"createNewCopies": false
409419
}
410420
----
411421
// KIBANA

docs/api/spaces-management/resolve_copy_saved_objects_conflicts.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ Execute the <<spaces-api-copy-saved-objects,copy saved objects to space API>>, w
4545
`includeReferences`::
4646
(Optional, boolean) When set to `true`, all saved objects related to the specified saved objects are copied into the target spaces. The `includeReferences` must be the same values used during the failed <<spaces-api-copy-saved-objects, copy saved objects to space API>> operation. The default value is `false`.
4747

48+
`createNewCopies`::
49+
(Optional, boolean) Creates new copies of the saved objects, regenerates each object ID, and resets the origin. When enabled during the
50+
initial copy, also enable when resolving copy errors. The default value is `true`.
51+
4852
`retries`::
4953
(Required, object) The retry operations to attempt, which can specify how to resolve different types of errors. Object keys represent the
5054
target space IDs.
@@ -148,6 +152,7 @@ $ curl -X POST api/spaces/_resolve_copy_saved_objects_errors
148152
"id": "my-dashboard"
149153
}],
150154
"includeReferences": true,
155+
"createNewCopies": false,
151156
"retries": {
152157
"sales": [
153158
{
@@ -246,6 +251,7 @@ $ curl -X POST api/spaces/_resolve_copy_saved_objects_errors
246251
"id": "my-dashboard"
247252
}],
248253
"includeReferences": true,
254+
"createNewCopies": false,
249255
"retries": {
250256
"marketing": [
251257
{

docs/developer/getting-started/debugging.asciidoc

Lines changed: 80 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,17 @@ For information about how to debug unit tests, refer to <<debugging-unit-tests>>
1515
https://github.com/elastic/apm-agent-nodejs[Elastic APM Node.js Agent]
1616
built-in for debugging purposes.
1717

18-
Its default configuration is meant to be used by core {kib} developers
18+
With an application as varied and complex as Kibana has become, it's not practical or scalable to craft all possible performance measurements by hand ahead of time. As such, we need to rely on tooling to help us catch things we may otherwise have missed.
19+
20+
For example, say you implement a brand new feature, plugin or service but don't quite know how it will impact Kibana's performance as a whole. APM allows us to not only spot that something is slow, but also hints at why it might be performing slowly. For example, if a function is slow on specific types of inputs, we can see where the time is spent by viewing the trace for that function call in the APM UI.
21+
22+
image::images/apm_example_trace.png[]
23+
24+
The net of metrics captured by APM are both a wide and deep because the entire application is instrumented at runtime and we simply take a sample of these metrics. This means that we don't have to know what we need to measure ahead of time, we'll instead just get (most) of the data we're likely going to need by default.
25+
26+
This type of data can help us identify unknown bottlenecks, spot when a performance regression may have been introduced, and inform how the performance of Kibana is changing between releases. Using APM allows us to be proactive in getting ahead of potential performance regressions before they are released.
27+
28+
The default APM configuration is meant to be used by core {kib} developers
1929
only, but it can easily be re-configured to your needs. In its default
2030
configuration it’s disabled and will, once enabled, send APM data to a
2131
centrally managed {es} cluster accessible only to Elastic
@@ -27,11 +37,8 @@ APM config option. To activate the APM agent, use the
2737
https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#active[`active`]
2838
APM config option.
2939

30-
All config options can be set either via environment variables, or by
31-
creating an appropriate config file under `config/apm.dev.js`. For
32-
more information about configuring the APM agent, please refer to
33-
https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuring-the-agent.html[the
34-
documentation].
40+
All config options can be set by
41+
creating an appropriate config file under `config/apm.dev.js`.
3542

3643
Example `config/apm.dev.js` file:
3744

@@ -56,4 +63,70 @@ ELASTIC_APM_ACTIVE=true yarn start
5663
Once the agent is active, it will trace all incoming HTTP requests to
5764
{kib}, monitor for errors, and collect process-level metrics. The
5865
collected data will be sent to the APM Server and is viewable in the APM
59-
UI in {kib}.
66+
UI in {kib}.
67+
68+
[discrete]
69+
=== Running Kibana with the APM Agent Locally
70+
71+
The easiest and recommended way of running Kibana with the APM agent locally is to use the solution provided by the https://github.com/elastic/apm-integration-testing[apm-integration-testing] repo. You’ll need https://www.docker.com/community-edition[Docker] and https://docs.docker.com/compose/install/[Docker Compose] to use the tool.
72+
73+
[discrete]
74+
==== Quick start guide
75+
76+
. Clone the https://github.com/elastic/apm-integration-testing[elastic/apm-integration-testing] repo.
77+
. Change into the apm-integration-testing repo:
78+
+
79+
[source,bash]
80+
----
81+
cd apm-integration-testing
82+
----
83+
84+
. Run {es} and the APM servers without running Kibana:
85+
+
86+
[source,bash]
87+
----
88+
./scripts/compose.py start master --no-kibana
89+
----
90+
91+
. Change into the {kib} repo:
92+
+
93+
[source,bash]
94+
----
95+
cd ../kibana
96+
----
97+
98+
. Change the elasticsearch credentials in your `kibana.yml` configuration file to match those needed by elasticsearch and the APM server (see the apm-integration-testing repo's https://github.com/elastic/apm-integration-testing#logging-in[README] for users provided to test different scenarios).
99+
. Make sure that the APM agent is active and points to the local APM server by adding the following configuration settings to to a config file under `config/apm.dev.js`:
100+
+
101+
Example `config/apm.dev.js` file:
102+
+
103+
[source,js]
104+
----
105+
module.exports = {
106+
active: true,
107+
serverUrl: 'http://127.0.0.1:8200', // supports `http://localhost:8200`
108+
centralConfig: false,
109+
breakdownMetrics: false,
110+
transactionSampleRate: 0.1,
111+
metricsInterval: '120s'
112+
};
113+
----
114+
115+
. Start Kibana with APM active using:
116+
+
117+
[source,bash]
118+
----
119+
yarn start
120+
----
121+
122+
. After Kibana starts up, navigate to the APM app, where you should see some transactions.
123+
124+
image::images/apm_ui_transactions.png[]
125+
126+
You can now continue doing what you want to in Kibana (e.g. install sample data sets, issue queries in dashboards, build new visualizations etc).
127+
Once you're finished, you can stop Kibana normally, then stop the {es} and APM servers in the apm-integration-testing clone with the following script:
128+
129+
[source,bash]
130+
----
131+
./scripts/compose.py stop
132+
----

docs/developer/getting-started/index.asciidoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,20 @@ View all available options by running `yarn start --help`
110110

111111
Read about more advanced options for <<running-kibana-advanced>>.
112112

113+
[discrete]
114+
=== Install pre-commit hook (optional)
115+
116+
In case you want to run a couple of checks like linting or check the file casing of the files to commit, we provide
117+
a way to install a pre-commit hook. To configure it you just need to run the following:
118+
119+
[source,bash]
120+
----
121+
node scripts/register_git_hook
122+
----
123+
124+
After the script completes the pre-commit hook will be created within the file `.git/hooks/pre-commit`.
125+
If you choose to not install it, don't worry, we still run a quick ci check to provide feedback earliest as we can about the same checks.
126+
113127
[discrete]
114128
=== Code away!
115129

0 commit comments

Comments
 (0)