Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into issue-36825-m…
Browse files Browse the repository at this point in the history
…ultiple-cookies
  • Loading branch information
jportner committed Nov 25, 2019
2 parents c7f9e12 + 793f1f1 commit 16ad27c
Show file tree
Hide file tree
Showing 4,452 changed files with 92,624 additions and 56,042 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 5 additions & 5 deletions .ci/Jenkinsfile_flaky
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ stage("Kibana Pipeline") {
if (!IS_XPACK) {
kibanaPipeline.buildOss()
if (CI_GROUP == '1') {
runbld "./test/scripts/jenkins_build_kbn_tp_sample_panel_action.sh"
runbld("./test/scripts/jenkins_build_kbn_tp_sample_panel_action.sh", "Build kbn tp sample panel action for ciGroup1")
}
} else {
kibanaPipeline.buildXpack()
Expand Down Expand Up @@ -62,18 +62,18 @@ stage("Kibana Pipeline") {
def getWorkerFromParams(isXpack, job, ciGroup) {
if (!isXpack) {
if (job == 'firefoxSmoke') {
return kibanaPipeline.getPostBuildWorker('firefoxSmoke', { runbld './test/scripts/jenkins_firefox_smoke.sh' })
return kibanaPipeline.getPostBuildWorker('firefoxSmoke', { runbld('./test/scripts/jenkins_firefox_smoke.sh', 'Execute kibana-firefoxSmoke') })
} else if(job == 'visualRegression') {
return kibanaPipeline.getPostBuildWorker('visualRegression', { runbld './test/scripts/jenkins_visual_regression.sh' })
return kibanaPipeline.getPostBuildWorker('visualRegression', { runbld('./test/scripts/jenkins_visual_regression.sh', 'Execute kibana-visualRegression') })
} else {
return kibanaPipeline.getOssCiGroupWorker(ciGroup)
}
}

if (job == 'firefoxSmoke') {
return kibanaPipeline.getPostBuildWorker('xpack-firefoxSmoke', { runbld './test/scripts/jenkins_xpack_firefox_smoke.sh' })
return kibanaPipeline.getPostBuildWorker('xpack-firefoxSmoke', { runbld('./test/scripts/jenkins_xpack_firefox_smoke.sh', 'Execute xpack-firefoxSmoke') })
} else if(job == 'visualRegression') {
return kibanaPipeline.getPostBuildWorker('xpack-visualRegression', { runbld './test/scripts/jenkins_xpack_visual_regression.sh' })
return kibanaPipeline.getPostBuildWorker('xpack-visualRegression', { runbld('./test/scripts/jenkins_xpack_visual_regression.sh', 'Execute xpack-visualRegression') })
} else {
return kibanaPipeline.getXpackCiGroupWorker(ciGroup)
}
Expand Down
21 changes: 2 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,6 @@ module.exports = {
'jsx-a11y/no-onchange': 'off',
},
},
{
files: ['src/core/public/application/**/*.{js,ts,tsx}'],
rules: {
'react/no-danger': 'off',
},
},
{
files: ['src/legacy/core_plugins/console/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/legacy/core_plugins/data/**/*.{js,ts,tsx}'],
rules: {
Expand Down Expand Up @@ -214,13 +202,6 @@ module.exports = {
'jsx-a11y/click-events-have-key-events': 'off',
},
},
{
files: ['x-pack/legacy/plugins/siem/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'react-hooks/rules-of-hooks': 'off',
},
},
{
files: ['x-pack/legacy/plugins/snapshot_restore/**/*.{js,ts,tsx}'],
rules: {
Expand Down Expand Up @@ -839,6 +820,8 @@ module.exports = {
// might be introduced after the other warns are fixed
// 'react/jsx-sort-props': 'error',
'react/jsx-tag-spacing': 'error',
// might be introduced after the other warns are fixed
'react-hooks/exhaustive-deps': 'off',
'require-atomic-updates': 'error',
'rest-spread-spacing': ['error', 'never'],
'symbol-description': 'error',
Expand Down
10 changes: 4 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
# Canvas
/x-pack/legacy/plugins/canvas/ @elastic/kibana-canvas

# Code
/x-pack/legacy/plugins/code/ @teams/code
/x-pack/test/functional/apps/code/ @teams/code
/x-pack/test/api_integration/apis/code/ @teams/code

# Logs & Metrics UI
/x-pack/legacy/plugins/infra/ @elastic/logs-metrics-ui
/x-pack/legacy/plugins/integrations_manager/ @elastic/epm
Expand All @@ -45,9 +40,11 @@
# ML team owns the transform plugin, ES team added here for visibility
# because the plugin lives in Kibana's Elasticsearch management section.
/x-pack/legacy/plugins/transform/ @elastic/ml-ui @elastic/es-ui
/x-pack/test/functional/apps/transform/ @elastic/ml-ui
/x-pack/test/functional/services/transform_ui/ @elastic/ml-ui
/x-pack/test/functional/services/transform.ts @elastic/ml-ui

# Operations
/renovate.json5 @elastic/kibana-operations
/src/dev/ @elastic/kibana-operations
/src/setup_node_env/ @elastic/kibana-operations
/src/optimize/ @elastic/kibana-operations
Expand Down Expand Up @@ -76,6 +73,7 @@
/x-pack/test/api_integration/apis/security/ @elastic/kibana-security

# Kibana Stack Services
/src/dev/i18n @elastic/kibana-stack-services
/packages/kbn-analytics/ @elastic/kibana-stack-services
/src/legacy/core_plugins/ui_metric/ @elastic/kibana-stack-services
/x-pack/legacy/plugins/telemetry @elastic/kibana-stack-services
Expand Down
7 changes: 4 additions & 3 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"dashboardEmbeddableContainer": "src/plugins/dashboard_embeddable_container",
"data": ["src/legacy/core_plugins/data", "src/plugins/data"],
"embeddableApi": "src/plugins/embeddable",
"share": "src/plugins/share",
"esUi": "src/plugins/es_ui_shared",
"expressions_np": "src/plugins/expressions",
"expressions": "src/legacy/core_plugins/expressions",
"devTools": "src/plugins/dev_tools",
"expressions": "src/plugins/expressions",
"inputControl": "src/legacy/core_plugins/input_control_vis",
"inspector": "src/plugins/inspector",
"inspectorViews": "src/legacy/core_plugins/inspector_views",
Expand All @@ -34,7 +35,7 @@
"visTypeTagCloud": "src/legacy/core_plugins/vis_type_tagcloud",
"visTypeTimeseries": "src/legacy/core_plugins/vis_type_timeseries",
"visTypeVega": "src/legacy/core_plugins/vis_type_vega",
"visualizations": "src/plugins/visualizations"
"visualizations": ["src/plugins/visualizations", "src/legacy/core_plugins/visualizations"]
},
"exclude": ["src/legacy/ui/ui_render/ui_render_mixin.js"],
"translations": []
Expand Down
20 changes: 13 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ Note that for VSCode, to enable "live" linting of TypeScript (and other) file ty
"eslint.autoFixOnSave": true,
```

It is **not** recommended to use `prettier` plugin on Kibana project. Because settings are in `eslintrc.js` file and it is applied to too many files that shouldn't be prettier-ized.
:warning: It is **not** recommended to use the [`Prettier` extension/IDE plugin](https://prettier.io/) while maintaining the Kibana project. Formatting and styling roles are set in the multiple `.eslintrc.js` files across the project and some of them use the [NPM version of Prettier](https://www.npmjs.com/package/prettier). Using the IDE extension might cause conflicts, applying the formatting to too many files that shouldn't be prettier-ized and/or highlighting errors that are actually OK.

### Internationalization

Expand Down Expand Up @@ -399,13 +399,19 @@ Test runner arguments:
- `[test path]` is the relative path to the test file.

Examples:
- Run the entire elasticsearch_service test suite with yarn:
`node scripts/jest src/core/server/elasticsearch/elasticsearch_service.test.ts`
- Run the jest test case whose description matches 'stops both admin and data clients':
`node scripts/jest -t 'stops both admin and data clients' src/core/server/elasticsearch/elasticsearch_service.test.ts`
- Run the entire elasticsearch_service test suite:
```
node scripts/jest src/core/server/elasticsearch/elasticsearch_service.test.ts
```
- Run the jest test case whose description matches `stops both admin and data clients`:
```
node scripts/jest -t 'stops both admin and data clients' src/core/server/elasticsearch/elasticsearch_service.test.ts
```
- Run the api integration test case whose description matches the given string:
`node scripts/functional_tests_server --config test/api_integration/config.js`
`node scripts/functional_test_runner --config test/api_integration/config.js --grep='should return 404 if id does not match any sample data sets'`
```
node scripts/functional_tests_server --config test/api_integration/config.js
node scripts/functional_test_runner --config test/api_integration/config.js --grep='should return 404 if id does not match any sample data sets'
```

### Debugging Unit Tests

Expand Down
14 changes: 7 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ library 'kibana-pipeline-library'
kibanaLibrary.load()

stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a little bit
timeout(time: 180, unit: 'MINUTES') {
timeout(time: 120, unit: 'MINUTES') {
timestamps {
ansiColor('xterm') {
catchError {
Expand All @@ -24,9 +24,9 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
'oss-ciGroup10': kibanaPipeline.getOssCiGroupWorker(10),
'oss-ciGroup11': kibanaPipeline.getOssCiGroupWorker(11),
'oss-ciGroup12': kibanaPipeline.getOssCiGroupWorker(12),
'oss-firefoxSmoke': kibanaPipeline.getPostBuildWorker('firefoxSmoke', { runbld './test/scripts/jenkins_firefox_smoke.sh' }),
'oss-accessibility': kibanaPipeline.getPostBuildWorker('accessibility', { runbld './test/scripts/jenkins_accessibility.sh' }),
'oss-visualRegression': kibanaPipeline.getPostBuildWorker('visualRegression', { runbld './test/scripts/jenkins_visual_regression.sh' }),
'oss-firefoxSmoke': kibanaPipeline.getPostBuildWorker('firefoxSmoke', { runbld('./test/scripts/jenkins_firefox_smoke.sh', 'Execute kibana-firefoxSmoke') }),
'oss-accessibility': kibanaPipeline.getPostBuildWorker('accessibility', { runbld('./test/scripts/jenkins_accessibility.sh', 'Execute kibana-accessibility') }),
'oss-visualRegression': kibanaPipeline.getPostBuildWorker('visualRegression', { runbld('./test/scripts/jenkins_visual_regression.sh', 'Execute kibana-visualRegression') }),
]),
'kibana-xpack-agent': kibanaPipeline.withWorkers('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
'xpack-ciGroup1': kibanaPipeline.getXpackCiGroupWorker(1),
Expand All @@ -39,9 +39,9 @@ stage("Kibana Pipeline") { // This stage is just here to help the BlueOcean UI a
'xpack-ciGroup8': kibanaPipeline.getXpackCiGroupWorker(8),
'xpack-ciGroup9': kibanaPipeline.getXpackCiGroupWorker(9),
'xpack-ciGroup10': kibanaPipeline.getXpackCiGroupWorker(10),
'xpack-firefoxSmoke': kibanaPipeline.getPostBuildWorker('xpack-firefoxSmoke', { runbld './test/scripts/jenkins_xpack_firefox_smoke.sh' }),
'xpack-accessibility': kibanaPipeline.getPostBuildWorker('xpack-accessibility', { runbld './test/scripts/jenkins_xpack_accessibility.sh' }),
'xpack-visualRegression': kibanaPipeline.getPostBuildWorker('xpack-visualRegression', { runbld './test/scripts/jenkins_xpack_visual_regression.sh' }),
'xpack-firefoxSmoke': kibanaPipeline.getPostBuildWorker('xpack-firefoxSmoke', { runbld('./test/scripts/jenkins_xpack_firefox_smoke.sh', 'Execute xpack-firefoxSmoke') }),
'xpack-accessibility': kibanaPipeline.getPostBuildWorker('xpack-accessibility', { runbld('./test/scripts/jenkins_xpack_accessibility.sh', 'Execute xpack-accessibility') }),
'xpack-visualRegression': kibanaPipeline.getPostBuildWorker('xpack-visualRegression', { runbld('./test/scripts/jenkins_xpack_visual_regression.sh', 'Execute xpack-visualRegression') }),
]),
])
}
Expand Down
1 change: 1 addition & 0 deletions STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ You should prefer modern language features in a lot of cases, e.g.:
* Prefer arrow function over storing `this` (no `const self = this;`)
* Prefer template strings over string concatenation
* Prefer the spread operator for copying arrays (`[...arr]`) over `arr.slice()`
* Use optional chaining (`?.`) and nullish Coalescing (`??`) over `lodash.get` (and similar utilities)
### Avoid mutability and state
Expand Down
6 changes: 3 additions & 3 deletions TYPESCRIPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The first thing that will probably happen when you convert a `.js` file in our s

declare module '@elastic/eui' {
// Add your types here
export const EuiPopoverTitle: React.SFC<EuiPopoverTitleProps>;
export const EuiPopoverTitle: React.FC<EuiPopoverTitleProps>;
...
}
```
Expand All @@ -47,13 +47,13 @@ Since `@elastic/eui` already ships with a module declaration, any local addition
// file `typings/@elastic/eui/index.d.ts`

import { CommonProps } from '@elastic/eui';
import { SFC } from 'react';
import { FC } from 'react';

declare module '@elastic/eui' {
export type EuiNewComponentProps = CommonProps & {
additionalProp: string;
};
export const EuiNewComponent: SFC<EuiNewComponentProps>;
export const EuiNewComponent: FC<EuiNewComponentProps>;
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/apm/advanced-queries.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ so it's easy to share a specific query or view with others.
In the screenshot below, you can begin to see some of the transaction fields available for filtering on:

[role="screenshot"]
image::apm/images/apm-query-bar.png[Example of the Kibana Query bar in APM UI in Kibana]
image::apm/images/apm-query-bar.png[Example of the Kibana Query bar in APM app in Kibana]

[float]
==== Example queries
Expand Down
29 changes: 23 additions & 6 deletions docs/apm/agent-configuration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@
[[agent-configuration]]
=== APM Agent configuration

beta[] APM Agent configuration allows you to fine-tune your agent configuration directly in Kibana.
APM Agent configuration allows you to fine-tune your agent configuration directly in Kibana.
Best of all, changes are automatically propagated to your APM agents so there's no need to redeploy.

To get started, simply choose the service and environment you wish to configure.
To get started, simply choose the services and environments you wish to configure.
The APM app will let you know when your configurations have been applied by your agents.

[role="screenshot"]
image::apm/images/apm-agent-configuration.png[APM Agent configuration in Kibana]

IMPORTANT: As this feature is in Beta, a limited number of configuration settings are supported.
We recommend you watch your agent logs to confirm that configuration has been applied.
If you have feedback, please reach out in our https://discuss.elastic.co/c/apm[Discuss forum].

[float]
==== Precedence

Expand All @@ -34,6 +31,26 @@ Kibana communicates any changed settings to APM Server so that your agents only
[float]
==== Supported configurations

[float]
===== `CAPTURE_BODY`

added[7.5.0] Can be `"off"`, `"errors"`, `"transactions"`, or `"all"`. Defaults to `"off"`.

For transactions that are HTTP requests, the Agent can optionally capture the request body, e.g., POST variables.
Remember, request bodies often contain sensitive values like passwords, credit card numbers, etc.
If your service handles sensitive data, enable this feature with care.
Turning on body capturing can also significantly increase the overhead the overhead of the Agent,
and the Elasticsearch index size.

[float]
===== `TRANSACTION_MAX_SPANS`

added[7.5.0] A number between `0` and `32000`. Defaults to `500`.

Limit the number of spans that are recorded per transaction.
This is helpful in cases where a transaction creates a very high amount of spans, e.g., thousands of SQL queries.
Setting an upper limit will help prevent the Agent and the APM Server from being overloaded.

[float]
===== `TRANSACTION_SAMPLE_RATE`

Expand Down
6 changes: 3 additions & 3 deletions docs/apm/errors.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ This makes it very easy to quickly see which errors are affecting your services,
and to take actions to rectify them.

[role="screenshot"]
image::apm/images/apm-errors-overview.png[Example view of the errors overview in the APM UI in Kibana]
image::apm/images/apm-errors-overview.png[Example view of the errors overview in the APM app in Kibana]

Selecting an error group ID or error message brings you to the *Error group*.

[role="screenshot"]
image::apm/images/apm-error-group.png[Example view of the error group page in the APM UI in Kibana]
image::apm/images/apm-error-group.png[Example view of the error group page in the APM app in Kibana]

Here, you'll see the error message, culprit, and the number of occurrences over time.

Expand Down Expand Up @@ -43,4 +43,4 @@ With Watcher, your team can set up reports within minutes.
Watches are managed separately in the dedicated Watcher UI available in Advanced Settings.

[role="screenshot"]
image::apm/images/apm-errors-watcher-assistant.png[Example view of the Watcher assistant for errors in APM UI in Kibana]
image::apm/images/apm-errors-watcher-assistant.png[Example view of the Watcher assistant for errors in APM app in Kibana]
2 changes: 1 addition & 1 deletion docs/apm/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ image::apm/images/apm-setup.png[Installation instructions on the APM page in Kib


Index patterns tell Kibana which Elasticsearch indices you want to explore.
An APM index pattern is necessary for certain features in the APM UI, like the query bar.
An APM index pattern is necessary for certain features in the APM app, like the query bar.
To set up the correct index pattern,
simply click *Load Kibana objects* at the bottom of the Setup Instructions.

Expand Down
Binary file modified docs/apm/images/apm-metrics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/apm/images/jvm-metrics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 11 additions & 3 deletions docs/apm/metrics.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
=== Metrics overview

The *Metrics* overview provides agent-specific metrics,
which lets you perform more in-depth root cause analysis investigations within the APM UI.
which lets you perform more in-depth root cause analysis investigations within the APM app.

If you're experiencing a problem with your service, you can use this page to attempt to find the underlying cause.
For example, you might be able to correlate a high number of errors with a long transaction duration, high CPU usage, or a memory leak.

[role="screenshot"]
image::apm/images/apm-metrics.png[Example view of the Metrics overview in APM UI in Kibana]
image::apm/images/apm-metrics.png[Example view of the Metrics overview in APM app in Kibana]

If you're using the Java Agent, the metrics view focuses on JVMs.
A detailed view of metrics per JVM makes it much easier to analyze the provided metrics:
CPU usage, memory usage, heap or non-heap memory,
thread count, garbage collection rate, and garbage collection time spent per minute.

[role="screenshot"]
image::apm/images/jvm-metrics.png[Example view of the Metrics overview for the Java Agent]

[[machine-learning-integration]]
=== Machine Learning integration
Expand All @@ -17,7 +25,7 @@ The Machine Learning integration will initiate a new job predefined to calculate
The response time graph will show the expected bounds and annotate the graph when the anomaly score is 75 or above.

[role="screenshot"]
image::apm/images/apm-ml-integration.png[Example view of anomaly scores on response times in APM UI in Kibana]
image::apm/images/apm-ml-integration.png[Example view of anomaly scores on response times in APM app in Kibana]

Jobs can be created per transaction type and based on the average response time.
You can manage jobs in the *Machine Learning jobs management*.
Expand Down
2 changes: 1 addition & 1 deletion docs/apm/services.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ The *Services* overview gives you quick insights into the health and general per
You can add services by setting the `service.name` configuration in each of the {apm-agents-ref}[APM agents] you’re instrumenting.

[role="screenshot"]
image::apm/images/apm-services-overview.png[Example view of services table the APM UI in Kibana]
image::apm/images/apm-services-overview.png[Example view of services table the APM app in Kibana]
Loading

0 comments on commit 16ad27c

Please sign in to comment.