Skip to content

Commit

Permalink
Merge branch 'main' into 120261-allowedspaces-deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Jan 24, 2022
2 parents d4308ae + 9cba74d commit fdc1aa5
Show file tree
Hide file tree
Showing 1,451 changed files with 66,243 additions and 91,366 deletions.
3 changes: 3 additions & 0 deletions .bazelrc.common
Expand Up @@ -132,6 +132,9 @@ coverage --instrument_test_targets
# Metadata settings
build --workspace_status_command="node ./src/dev/bazel_workspace_status.js"

# Load remote cache settings, if they exist
try-import %workspace%/.bazelrc.cache

# Load any settings specific to the current user.
# .bazelrc.user should appear in .gitignore so that settings are not shared with team members
# This needs to be last statement in this
Expand Down
3 changes: 3 additions & 0 deletions .buildkite/scripts/common/env.sh
Expand Up @@ -22,6 +22,9 @@ KIBANA_PKG_BRANCH="$(jq -r .branch "$KIBANA_DIR/package.json")"
export KIBANA_PKG_BRANCH
export KIBANA_BASE_BRANCH="$KIBANA_PKG_BRANCH"

KIBANA_PKG_VERSION="$(jq -r .version "$KIBANA_DIR/package.json")"
export KIBANA_PKG_VERSION

export GECKODRIVER_CDNURL="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache"
export CHROMEDRIVER_CDNURL="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache"
export RE2_DOWNLOAD_MIRROR="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache"
Expand Down
9 changes: 9 additions & 0 deletions .buildkite/scripts/lifecycle/pre_command.sh
Expand Up @@ -92,6 +92,15 @@ export KIBANA_DOCKER_USERNAME
KIBANA_DOCKER_PASSWORD="$(retry 5 5 vault read -field=password secret/kibana-issues/dev/container-registry)"
export KIBANA_DOCKER_PASSWORD

SYNTHETICS_SERVICE_USERNAME="$(retry 5 5 vault read -field=username secret/kibana-issues/dev/kibana-ci-synthetics-credentials)"
export SYNTHETICS_SERVICE_USERNAME

SYNTHETICS_SERVICE_PASSWORD="$(retry 5 5 vault read -field=password secret/kibana-issues/dev/kibana-ci-synthetics-credentials)"
export SYNTHETICS_SERVICE_PASSWORD

SYNTHETICS_SERVICE_MANIFEST="$(retry 5 5 vault read -field=manifest secret/kibana-issues/dev/kibana-ci-synthetics-credentials)"
export SYNTHETICS_SERVICE_MANIFEST

# Setup Failed Test Reporter Elasticsearch credentials
{
TEST_FAILURES_ES_CLOUD_ID=$(retry 5 5 vault read -field=cloud_id secret/kibana-issues/dev/failed_tests_reporter_es)
Expand Down
5 changes: 3 additions & 2 deletions .buildkite/scripts/steps/package_testing/build.sh
Expand Up @@ -4,9 +4,10 @@ set -euo pipefail

.buildkite/scripts/bootstrap.sh

echo "--- Build Kibana Distribution"
node scripts/build --all-platforms --debug --skip-docker-cloud --skip-docker-ubi --skip-docker-contexts

DOCKER_FILE="kibana-$KIBANA_PKG_VERSION-SNAPSHOT-docker-image.tar.gz"

cd target
buildkite-agent artifact upload "./*-docker-image.tar.gz;./*.deb;./*.rpm"
buildkite-agent artifact upload "./$DOCKER_FILE;./*.deb;./*.rpm"
cd ..
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/package_testing/test.sh
Expand Up @@ -15,7 +15,7 @@ elif [[ "$TEST_PACKAGE" == "rpm" ]]; then
buildkite-agent artifact download 'kibana-*.rpm' . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
KIBANA_IP_ADDRESS="192.168.50.6"
elif [[ "$TEST_PACKAGE" == "docker" ]]; then
buildkite-agent artifact download 'kibana-*-docker-image.tar.gz' . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
buildkite-agent artifact download "kibana-$KIBANA_PKG_VERSION-SNAPSHOT-docker-image.tar.gz" . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
KIBANA_IP_ADDRESS="192.168.50.7"
fi
cd ..
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Expand Up @@ -35,7 +35,7 @@ snapshots.js
/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/
/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/
/packages/kbn-ui-framework/dist
/packages/kbn-ui-shared-deps-src/src/flot_charts
/packages/kbn-flot-charts/lib
/packages/kbn-monaco/src/painless/antlr

# Bazel
Expand Down
6 changes: 1 addition & 5 deletions .eslintrc.js
Expand Up @@ -226,10 +226,6 @@ const RESTRICTED_IMPORTS = [
name: 'react-use',
message: 'Please use react-use/lib/{method} instead.',
},
{
name: '@kbn/io-ts-utils',
message: `Import directly from @kbn/io-ts-utils/{method} submodules`,
},
];

module.exports = {
Expand Down Expand Up @@ -1569,7 +1565,7 @@ module.exports = {
},
},
{
files: ['packages/kbn-ui-shared-deps-src/src/flot_charts/**/*.js'],
files: ['packages/kbn-flot-charts/lib/**/*.js'],
env: {
jquery: true,
},
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -87,8 +87,9 @@ report.asciidoc
/bazel
/bazel-*
.bazelrc.user
.bazelrc.cache

elastic-agent-*
fleet-server-*
elastic-agent.yml
fleet-server.yml
fleet-server.yml
2 changes: 1 addition & 1 deletion .i18nrc.json
Expand Up @@ -32,7 +32,7 @@
"expressionShape": "src/plugins/expression_shape",
"expressionTagcloud": "src/plugins/chart_expressions/expression_tagcloud",
"fieldFormats": "src/plugins/field_formats",
"flot": "packages/kbn-ui-shared-deps-src/src/flot_charts",
"flot": "packages/kbn-flot-charts/lib",
"home": "src/plugins/home",
"indexPatternEditor": "src/plugins/data_view_editor",
"indexPatternFieldEditor": "src/plugins/data_view_field_editor",
Expand Down
68 changes: 20 additions & 48 deletions docs/apm/troubleshooting.asciidoc
Expand Up @@ -47,37 +47,14 @@ This section can help with any of the following:
There are a number of factors that could be at play here.
One important thing to double-check first is your index template.

*Index template*
An APM index template must exist for the APM app to work correctly.
By default, this index template is created by APM Server on startup.
However, this only happens if `setup.template.enabled` is `true` in `apm-server.yml`.
You can create the index template manually by running `apm-server setup`.
*Index templates*
For the APM app to work correctly, an index template must exist for each APM data stream.
By default, {fleet} sets up APM index templates when the APM integration is installed.
Take note that index templates *cannot* be applied retroactively -- they are only applied at index creation time.
More information is available in {apm-guide-ref}/apm-server-configuration.html[Set up and configure].

You can check for the existence of an APM index template using the
{ref}/indices-get-template.html[Get index template API].
If you're using the default index naming pattern, that request would be:

[source,js]
--------------------------------------------------
GET /_template/apm-{version}
--------------------------------------------------
// CONSOLE

*Using Logstash, Kafka, etc.*
If you're not outputting data directly from APM Server to Elasticsearch (perhaps you're using Logstash or Kafka),
then the index template will not be set up automatically. Instead, you'll need to
{apm-guide-ref}/apm-server-template.html[load the template manually].

*Using a custom index names*
This problem can also occur if you've customized the index name that you write APM data to.
If you change the default, you must also configure the `setup.template.name` and `setup.template.pattern` options.
See {apm-guide-ref}/configuration-template.html[Load the Elasticsearch index template].
If the Elasticsearch index template has already been successfully loaded to the index,
you can customize the indices that the APM app uses to display data.
Navigate to *APM* > *Settings* > *Indices*, and change all `xpack.apm.indices.*` values to
include the new index pattern. For example: `customIndexName-*`.
You can check for the existence of APM index templates in Kibana.
Go to **Stack Management** > **Index Management** > **Index Templates** and search for `apm`.

[float]
[[troubleshooting-too-many-transactions]]
Expand Down Expand Up @@ -164,39 +141,34 @@ You can also use the Agent's public API to manually set a name for the transacti
=== Fields are not searchable

In Elasticsearch, index templates are used to define settings and mappings that determine how fields should be analyzed.
The recommended index template file for APM Server is installed by the APM Server packages.
This template, by default, enables and disables indexing on certain fields.
The recommended index templates for APM are installed by {fleet} when the Elastic APM integration is installed.
These templates, by default, enable and disable indexing on certain fields.

As an example, some agents store cookie values in `http.request.cookies`.
Since `http.request` has disabled dynamic indexing, and `http.request.cookies` is not declared in a custom mapping,
the values in `http.request.cookies` are not indexed and thus not searchable.

*Ensure an index pattern exists*
As a first step, you should ensure the correct index pattern exists.
Open the main menu, then click *Stack Management > Index Patterns*.
In the pattern list, you should see an apm index pattern; The default is `apm-*`.
If you don't, the index pattern doesn't exist. See <<no-apm-data-found>> for information on how to fix this problem.
*Ensure an APM data view exists*
As a first step, you should ensure the correct data view exists.
In {kib}, go to *Stack Management* > *Data views*.
You should see the APM data view--the default is
`traces-apm*,apm-*,logs-apm*,apm-*,metrics-apm*,apm-*`.
If you don't, the data view doesn't exist.
To fix this, navigate to the APM app in {kib} and select *Add data*.
In the APM tutorial, click *Load Kibana objects* to create the APM data view.

Selecting the `apm-*` index pattern shows a listing of every field defined in the pattern.
If creating an APM data view doesn't solve the problem,
see <<no-apm-data-found>> for further troubleshooting.

*Ensure a field is searchable*
There are two things you can do to if you'd like to ensure a field is searchable:

1. Index your additional data as {apm-guide-ref}/metadata.html[labels] instead.
These are dynamic by default, which means they will be indexed and become searchable and aggregatable.

2. Use the `append_fields` feature. As an example,
adding the following to `apm-server.yml` will enable dynamic indexing for `http.request.cookies`:

[source,yml]
----
setup.template.enabled: true
setup.template.overwrite: true
setup.template.append_fields:
- name: http.request.cookies
type: object
dynamic: true
----
2. Create a custom mapping for the field.
// link will be added in a later PR.
// docs will be added in https://github.com/elastic/apm-server/pull/6940

[float]
[[service-map-rum-connections]]
Expand Down
2 changes: 2 additions & 0 deletions docs/canvas/canvas-expression-lifecycle.asciidoc
Expand Up @@ -14,6 +14,7 @@ To use demo dataset available in Canvas to produce a table, run the following ex

[source,text]
----
/* Simple demo table */
filters
| demodata
| table
Expand All @@ -24,6 +25,7 @@ This expression starts out with the <<filters_fn, filters>> function, which prov

The filtered <<demodata_fn, demo data>> becomes the _context_ of the next function, <<table_fn, table>>, which creates a table visualization from this data set. The <<table_fn, table>> function isn’t strictly required, but by being explicit, you have the option of providing arguments to control things like the font used in the table. The output of the <<table_fn, table>> function becomes the _context_ of the <<render_fn, render>> function. Like the <<table_fn, table>>, the <<render_fn, render>> function isn’t required either, but it allows access to other arguments, such as styling the border of the element or injecting custom CSS.

It is possible to add comments to the expression by starting them with a `//` sequence or by using `/*` and `*/` to enclose multi-line comments.

[[canvas-function-arguments]]
=== Function arguments
Expand Down
7 changes: 0 additions & 7 deletions docs/developer/advanced/running-elasticsearch.asciidoc
Expand Up @@ -71,13 +71,6 @@ elasticsearch.password: {{ password }}
elasticsearch.ssl.verificationMode: none
----

If many other users will be interacting with your remote cluster, you'll want to add the following to avoid causing conflicts:

[source,bash]
----
kibana.index: '.{YourGitHubHandle}-kibana'
----

==== Running remote clusters

Setup remote clusters for cross cluster search (CCS) and cross cluster replication (CCR).
Expand Down
3 changes: 3 additions & 0 deletions docs/developer/plugin-list.asciidoc
Expand Up @@ -140,6 +140,9 @@ All the arguments to expression functions need to be serializable, as well as in
Expression functions should try to stay 'pure'. This makes functions easy to reuse and also
make it possible to serialize the whole chain as well as output at every step of execution.
It is possible to add comments to expressions by starting them with a `//` sequence
or by using `/*` and `*/` to enclose multi-line comments.
Expressions power visualizations in Dashboard and Lens, as well as, every
*element* in Canvas is backed by an expression.
Expand Down
Expand Up @@ -147,6 +147,7 @@ readonly links: {
readonly significant_terms: string;
readonly terms: string;
readonly terms_doc_count_error: string;
readonly rare_terms: string;
readonly avg: string;
readonly avg_bucket: string;
readonly max_bucket: string;
Expand Down

0 comments on commit fdc1aa5

Please sign in to comment.