Skip to content

Commit f9f0c66

Browse files
Merge branch '7.x' into backport/7.x/pr-76946
2 parents 67348a8 + 0b62537 commit f9f0c66

578 files changed

Lines changed: 17647 additions & 14668 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_baseline_capture

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ kibanaPipeline(timeoutMinutes: 120) {
1212
]) {
1313
parallel([
1414
'oss-baseline': {
15-
workers.ci(name: 'oss-baseline', size: 's-highmem', ramDisk: true, runErrorReporter: false) {
15+
workers.ci(name: 'oss-baseline', size: 'l', ramDisk: true, runErrorReporter: false) {
1616
kibanaPipeline.functionalTestProcess('oss-baseline', './test/scripts/jenkins_baseline.sh')()
1717
}
1818
},
1919
'xpack-baseline': {
20-
workers.ci(name: 'xpack-baseline', size: 's-highmem', ramDisk: true, runErrorReporter: false) {
20+
workers.ci(name: 'xpack-baseline', size: 'l', ramDisk: true, runErrorReporter: false) {
2121
kibanaPipeline.functionalTestProcess('xpack-baseline', './test/scripts/jenkins_xpack_baseline.sh')()
2222
}
2323
},

.telemetryrc.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
"src/plugins/kibana_react/",
77
"src/plugins/testbed/",
88
"src/plugins/kibana_utils/",
9-
"src/plugins/kibana_usage_collection/server/collectors/kibana/kibana_usage_collector.ts",
109
"src/plugins/kibana_usage_collection/server/collectors/management/telemetry_management_collector.ts",
11-
"src/plugins/kibana_usage_collection/server/collectors/ui_metric/telemetry_ui_metric_collector.ts",
12-
"src/plugins/telemetry/server/collectors/usage/telemetry_usage_collector.ts"
10+
"src/plugins/kibana_usage_collection/server/collectors/ui_metric/telemetry_ui_metric_collector.ts"
1311
]
1412
}
1513
]
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
[[ci-metrics]]
2+
== CI Metrics
3+
4+
In addition to running our tests, CI collects metrics about the Kibana build. These metrics are sent to an external service to track changes over time, and to provide PR authors insights into the impact of their changes.
5+
6+
7+
[[ci-metric-types]]
8+
=== Metric types
9+
10+
11+
[[ci-metric-types-bundle-size-metrics]]
12+
==== Bundle size
13+
14+
These metrics help contributors know how they are impacting the size of the bundles Kibana creates, and help make sure that Kibana loads as fast as possible.
15+
16+
[[ci-metric-page-load-bundle-size]] `page load bundle size` ::
17+
The size of the entry file produced for each bundle/plugin. This file is always loaded on every page load, so it should be as small as possible. To reduce this metric you can put any code that isn't necessary on every page load behind an https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports[`async import()`].
18+
+
19+
Code that is shared statically with other plugins will contribute to the `page load bundle size` of that plugin. This includes exports from the `public/index.ts` file and any file referenced by the `extraPublicDirs` manifest property.
20+
21+
[[ci-metric-async-chunks-size]] `async chunks size` ::
22+
An "async chunk" is created for the files imported by each https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports[`async import()`] statement. This metric tracks the sum size of these chunks, in bytes, broken down by plugin/bundle id. You can think of this as the amount of code users will have to download if they access all the components/applications within a bundle.
23+
24+
[[ci-metric-misc-asset-size]] `miscellaneous assets size` ::
25+
A "miscellaneous asset" is anything that isn't an async chunk or entry chunk, often images. This metric tracks the sum size of these assets, in bytes, broken down by plugin/bundle id.
26+
27+
[[ci-metric-bundle-module-count]] `@kbn/optimizer bundle module count` ::
28+
The number of separate modules included in each bundle/plugin. This is the best indicator we have for how long a specific bundle will take to be built by the `@kbn/optimizer`, so we report it to help people know when they've imported a module which might include a surprising number of sub-modules.
29+
30+
31+
[[ci-metric-types-distributable-size]]
32+
==== Distributable size
33+
34+
The size of the Kibana distributable is an essential metric as it not only contributes to the time it takes to download, but it also impacts time it takes to extract the archive once downloaded.
35+
36+
There are several metrics that we don't report on PRs because gzip-compression produces different file sizes even when provided the same input, so this metric would regularly show changes even though PR authors hadn't made any relevant changes.
37+
38+
All metrics are collected from the `tar.gz` archive produced for the linux platform.
39+
40+
[[ci-metric-distributable-file-count]] `distributable file count` ::
41+
The number of files included in the default distributable.
42+
43+
[[ci-metric-oss-distributable-file-count]] `oss distributable file count` ::
44+
The number of files included in the OSS distributable.
45+
46+
[[ci-metric-distributable-size]] `distributable size` ::
47+
The size, in bytes, of the default distributable. _(not reported on PRs)_
48+
49+
[[ci-metric-oss-distributable-size]] `oss distributable size` ::
50+
The size, in bytes, of the OSS distributable. _(not reported on PRs)_
51+
52+
53+
[[ci-metric-types-saved-object-field-counts]]
54+
==== Saved Object field counts
55+
56+
Elasticsearch limits the number of fields in an index to 1000 by default, and we want to avoid raising that limit.
57+
58+
[[ci-metric-saved-object-field-count]] `Saved Objects .kibana field count` ::
59+
The number of saved object fields broken down by saved object type.
60+
61+
62+
[[ci-metric-adding-new-metrics]]
63+
=== Adding new metrics
64+
65+
You can report new metrics by using the `CiStatsReporter` class provided by the `@kbn/dev-utils` package. This class is automatically configured on CI and its methods noop when running outside of CI. For more details checkout the {kib-repo}blob/{branch}/packages/kbn-dev-utils/src/ci_stats_reporter[`CiStatsReporter` readme].

docs/developer/contributing/index.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Read <<development-getting-started>> to get your environment up and running, the
99
* <<development-tests>>
1010
* <<development-github>>
1111
* <<interpreting-ci-failures>>
12+
* <<ci-metrics>>
1213
* <<development-documentation>>
1314
* <<development-pull-request>>
1415
* <<kibana-issue-reporting>>
@@ -78,6 +79,8 @@ include::development-tests.asciidoc[leveloffset=+1]
7879

7980
include::interpreting-ci-failures.asciidoc[leveloffset=+1]
8081

82+
include::development-ci-metrics.asciidoc[leveloffset=+1]
83+
8184
include::development-documentation.asciidoc[leveloffset=+1]
8285

8386
include::development-pull-request.asciidoc[leveloffset=+1]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [DuplicateIndexPatternError](./kibana-plugin-plugins-data-public.duplicateindexpatternerror.md) &gt; [(constructor)](./kibana-plugin-plugins-data-public.duplicateindexpatternerror._constructor_.md)
4+
5+
## DuplicateIndexPatternError.(constructor)
6+
7+
Constructs a new instance of the `DuplicateIndexPatternError` class
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
constructor(message: string);
13+
```
14+
15+
## Parameters
16+
17+
| Parameter | Type | Description |
18+
| --- | --- | --- |
19+
| message | <code>string</code> | |
20+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [DuplicateIndexPatternError](./kibana-plugin-plugins-data-public.duplicateindexpatternerror.md)
4+
5+
## DuplicateIndexPatternError class
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
export declare class DuplicateIndexPatternError extends Error
11+
```
12+
13+
## Constructors
14+
15+
| Constructor | Modifiers | Description |
16+
| --- | --- | --- |
17+
| [(constructor)(message)](./kibana-plugin-plugins-data-public.duplicateindexpatternerror._constructor_.md) | | Constructs a new instance of the <code>DuplicateIndexPatternError</code> class |
18+

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpattern.fieldformatmap.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,5 @@
77
<b>Signature:</b>
88

99
```typescript
10-
fieldFormatMap?: Record<string, {
11-
id: string;
12-
params: unknown;
13-
}>;
10+
fieldFormatMap?: Record<string, SerializedFieldFormat<unknown> | undefined>;
1411
```

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpattern.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export interface IIndexPattern
1414

1515
| Property | Type | Description |
1616
| --- | --- | --- |
17-
| [fieldFormatMap](./kibana-plugin-plugins-data-public.iindexpattern.fieldformatmap.md) | <code>Record&lt;string, {</code><br/><code> id: string;</code><br/><code> params: unknown;</code><br/><code> }&gt;</code> | |
17+
| [fieldFormatMap](./kibana-plugin-plugins-data-public.iindexpattern.fieldformatmap.md) | <code>Record&lt;string, SerializedFieldFormat&lt;unknown&gt; &#124; undefined&gt;</code> | |
1818
| [fields](./kibana-plugin-plugins-data-public.iindexpattern.fields.md) | <code>IFieldType[]</code> | |
1919
| [getFormatterForField](./kibana-plugin-plugins-data-public.iindexpattern.getformatterforfield.md) | <code>(field: IndexPatternField &#124; IndexPatternField['spec'] &#124; IFieldType) =&gt; FieldFormat</code> | |
2020
| [id](./kibana-plugin-plugins-data-public.iindexpattern.id.md) | <code>string</code> | |

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpatternfieldlist.tospec.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
```typescript
1010
toSpec(options?: {
1111
getFormatterForField?: IndexPattern['getFormatterForField'];
12-
}): FieldSpec[];
12+
}): IndexPatternFieldMap;
1313
```
1414

1515
## Parameters
@@ -20,5 +20,5 @@ toSpec(options?: {
2020

2121
<b>Returns:</b>
2222

23-
`FieldSpec[]`
23+
`IndexPatternFieldMap`
2424

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern._constructor_.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ Constructs a new instance of the `IndexPattern` class
99
<b>Signature:</b>
1010

1111
```typescript
12-
constructor(id: string | undefined, { savedObjectsClient, apiClient, patternCache, fieldFormats, indexPatternsService, onNotification, onError, onUnsupportedTimePattern, shortDotsEnable, metaFields, }: IndexPatternDeps);
12+
constructor({ spec, savedObjectsClient, fieldFormats, shortDotsEnable, metaFields, }: IndexPatternDeps);
1313
```
1414

1515
## Parameters
1616

1717
| Parameter | Type | Description |
1818
| --- | --- | --- |
19-
| id | <code>string &#124; undefined</code> | |
20-
| { savedObjectsClient, apiClient, patternCache, fieldFormats, indexPatternsService, onNotification, onError, onUnsupportedTimePattern, shortDotsEnable, metaFields, } | <code>IndexPatternDeps</code> | |
19+
| { spec, savedObjectsClient, fieldFormats, shortDotsEnable, metaFields, } | <code>IndexPatternDeps</code> | |
2120

0 commit comments

Comments
 (0)