Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/7.x' into backport/7.x/pr-94274
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Mar 19, 2021
2 parents 81a4a3c + 4e4f0cf commit 4fcf884
Show file tree
Hide file tree
Showing 591 changed files with 10,197 additions and 4,886 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,7 @@ module.exports = {
{
files: ['x-pack/plugins/fleet/**/*.{js,mjs,ts,tsx}'],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'import/order': [
'warn',
{
Expand Down
14 changes: 7 additions & 7 deletions api_docs/core_saved_objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -4581,15 +4581,15 @@
"description": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 34
"lineNumber": 36
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 34
"lineNumber": 36
}
},
{
Expand Down Expand Up @@ -4628,7 +4628,7 @@
"description": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 43
"lineNumber": 45
}
},
{
Expand All @@ -4641,15 +4641,15 @@
"description": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 43
"lineNumber": 45
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 43
"lineNumber": 45
}
},
{
Expand Down Expand Up @@ -4681,15 +4681,15 @@
"description": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 58
"lineNumber": 60
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "src/core/server/saved_objects/export/errors.ts",
"lineNumber": 58
"lineNumber": 60
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion api_docs/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -27843,4 +27843,4 @@
}
]
}
}
}
2 changes: 1 addition & 1 deletion api_docs/data_search.json
Original file line number Diff line number Diff line change
Expand Up @@ -19470,4 +19470,4 @@
}
]
}
}
}
2 changes: 1 addition & 1 deletion api_docs/expressions.json
Original file line number Diff line number Diff line change
Expand Up @@ -33883,4 +33883,4 @@
}
]
}
}
}
14 changes: 7 additions & 7 deletions api_docs/lens.json
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/lens/public/indexpattern_datasource/types.ts",
"lineNumber": 72
"lineNumber": 73
},
"signature": [
"Record<string, Pick<",
Expand All @@ -347,7 +347,7 @@
],
"source": {
"path": "x-pack/plugins/lens/public/indexpattern_datasource/types.ts",
"lineNumber": 71
"lineNumber": 72
},
"initialIsOpen": false
},
Expand Down Expand Up @@ -483,7 +483,7 @@
],
"source": {
"path": "x-pack/plugins/lens/public/plugin.ts",
"lineNumber": 88
"lineNumber": 90
},
"signature": [
"React.ComponentType<",
Expand All @@ -509,7 +509,7 @@
],
"source": {
"path": "x-pack/plugins/lens/public/plugin.ts",
"lineNumber": 97
"lineNumber": 99
},
"signature": [
"(input: ",
Expand All @@ -533,7 +533,7 @@
],
"source": {
"path": "x-pack/plugins/lens/public/plugin.ts",
"lineNumber": 101
"lineNumber": 103
},
"signature": [
"() => boolean"
Expand All @@ -542,7 +542,7 @@
],
"source": {
"path": "x-pack/plugins/lens/public/plugin.ts",
"lineNumber": 79
"lineNumber": 81
},
"initialIsOpen": false
},
Expand Down Expand Up @@ -1553,7 +1553,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/lens/public/indexpattern_datasource/types.ts",
"lineNumber": 75
"lineNumber": 76
},
"signature": [
"{ columns: Record<string, IndexPatternColumn>; columnOrder: string[]; incompleteColumns?: Record<string, IncompleteColumn> | undefined; }"
Expand Down
3 changes: 3 additions & 0 deletions docs/api/saved-objects/export.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ experimental[] Retrieve sets of saved objects that you want to import into {kib}

TIP: You must include `type` or `objects` in the request body.

NOTE: The <<savedObjects-maxImportExportSize, `savedObjects.maxImportExportSize`>> configuration setting
limits the number of saved objects which may be exported.

[[saved-objects-api-export-request-response-body]]
==== Response body

Expand Down
5 changes: 5 additions & 0 deletions docs/api/saved-objects/import.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ The request body must include the multipart/form-data type.

`file`::
A file exported using the export API.
+
NOTE: The <<savedObjects-maxImportExportSize, `savedObjects.maxImportExportSize`>> configuration setting
limits the number of saved objects which may be included in this file. Similarly, the
<<savedObjects-maxImportPayloadBytes, `savedObjects.maxImportPayloadBytes`>> setting limits the overall
size of the file that can be imported.

[[saved-objects-api-import-response-body]]
==== Response body
Expand Down
53 changes: 37 additions & 16 deletions docs/apm/advanced-queries.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,63 @@
[[advanced-queries]]
=== Query your data

Querying your APM data is a powerful tool that can make finding bottlenecks in your code even easier.
Imagine you have a user that complains about a slow response time in a specific service.
With the query bar, you can easily filter the APM app to only display trace data for that user,
or, to only show transactions that are slower than a specified time threshold.
Querying your APM data is an essential tool that can make finding bottlenecks in your code even more straightforward.

[float]
==== Example APM app queries
Using the query bar, a powerful data query feature, you can pass advanced queries on your data
to filter on specific pieces of information you’re interested in.

The query bar comes with a handy autocomplete that helps find the fields and even provides suggestions to the data they include.
You can select the query bar and hit the down arrow on your keyboard to begin scanning recommendations.

* Exclude response times slower than 2000 ms: `transaction.duration.us > 2000000`
* Filter by response status code: `context.response.status_code ≥ 400`
* Filter by single user ID: `context.user.id : 12`
[float]
[[apm-app-advanced-queries]]
=== Querying in the APM app

When querying in the APM app, you're merely searching and selecting data from fields in Elasticsearch documents.
Queries entered into the query bar are also added as parameters to the URL,
so it's easy to share a specific query or view with others.
When querying in the APM app, you’re merely searching and selecting data from fields in {es} documents. Queries entered
into the query bar are also added as parameters to the URL, so it’s easy to share a specific query or view with others.

When you type, you can begin to see some of the transaction fields available for filtering:

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

TIP: Read the {kibana-ref}/kuery-query.html[Kibana Query Language Enhancements] documentation to learn more about the capabilities of the {kib} query language.
[TIP]
=====
To learn more about the {kib} query language capabilities, see the {kibana-ref}/kuery-query.html[Kibana Query Language Enhancements] documentation.
=====

[float]
[[apm-app-queries]]
==== APM app queries

APM queries can be handy for removing noise from your data in the <<services,Services>>, <<transactions,Transactions>>,
<<errors,Errors>>, <<metrics,Metrics>>, and <<traces,Traces>> views.

For example, in the *Services* view, you can quickly view a list of all the instrumented services running on your production
environment: `service.environment : production`. Or filter the list by including the APM agent's name and the host it’s running on:
`service.environment : "production" and agent.name : "java" and host.name : "prod-server1"`.

On the *Traces* view, you might want to view failed transaction results from any of your running containers:
`transaction.result :"FAILURE" and container.id : *`.

On the *Transactions* view, you may want to list only the slower transactions than a specified time threshold: `transaction.duration.us > 2000000`.
Or filter the list by including the service version and the Kubernetes pod it's running on:
`transaction.duration.us > 2000000 and service.version : "7.12.0" and kubernetes.pod.name : "pod-5468b47f57-pqk2m"`.

[float]
[[discover-advanced-queries]]
=== Querying in Discover

Alternatively, you can query your APM documents in {kibana-ref}/discover.html[*Discover*].
Querying documents in *Discover* works the same way as querying in the APM app,
Querying documents in *Discover* works the same way as queries in the APM app,
and *Discover* supports all of the example APM app queries shown on this page.

[float]
==== Example Discover query
[[discover-queries]]
==== Discover queries

One example where you may want to make use of *Discover*,
is for viewing _all_ transactions for an endpoint, instead of just a sample.
is to view _all_ transactions for an endpoint instead of just a sample.

TIP: Starting in v7.6, you can view ten samples per bucket in the APM app, instead of just one.

Expand Down
59 changes: 14 additions & 45 deletions docs/apm/filters.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,34 @@
<titleabbrev>Filter data</titleabbrev>
++++

APM provides two different ways you can filter your data within the APM App:

* <<global-filters>>
* <<contextual-filters>>

[[global-filters]]
==== Global filters

Global filters are ways you can filter any and all data across the APM app.
They are available in the Services, Transactions, Errors, Metrics, and Traces views,
and any filter applied will persist as you move between pages.
Global filters are ways you can filter data across the APM app based on a specific
time range or environment. They are available in the Services, Transactions, Errors,
Metrics, and Traces views, and any filter applied will persist as you move between pages.

[role="screenshot"]
image::apm/images/global-filters.png[Global filters available in the APM app in Kibana]

[float]
===== Global time range

The <<set-time-filter,global time range filter>> in {kib} restricts APM data to a specific time period.

[float]
[[query-bar]]
===== Query bar
[NOTE]
=====
If you prefer to use advanced queries on your data to filter on specific pieces
of information, see <<advanced-queries,Query your data>>.
=====

The query bar is a powerful data query feature.
Similar to the query bar in {kibana-ref}/discover.html[Discover],
it enables you to pass advanced queries on your data to filter on particular pieces of information that you're interested in.
It comes with a handy autocomplete that helps find the fields and even provides suggestions to the data they include.
You can select the query bar and hit the down arrow on your keyboard to begin seeing recommendations.
[[global-time-range]]
==== Global time range

See <<query-bar,advanced queries>> for more information and sample queries.
The <<set-time-filter,global time range filter>> in {kib} restricts APM data to a specific time period.

[float]
[[environment-selector]]
===== Service environment filter
==== Service environment filter

The environment selector is a global filter for `service.environment`.
It allows you to view only relevant data, and is especially useful for separating development from production environments.
It allows you to view only relevant data and is especially useful for separating development from production environments.
By default, all environments are displayed. If there are no environment options, you'll see "not defined".

Service environments are defined when configuring your APM agents.
It's vital to be consistent when naming environments in your agents.
See the documentation for each agent you're using to learn how to configure service environments:
To learn how to configure service environments, see the specific agent documentation:

* *Go:* {apm-go-ref}/configuration.html#config-environment[`ELASTIC_APM_ENVIRONMENT`]
* *Java:* {apm-java-ref}/config-core.html#config-environment[`environment`]
Expand All @@ -58,19 +43,3 @@ See the documentation for each agent you're using to learn how to configure serv
* *Python:* {apm-py-ref}/configuration.html#config-environment[`environment`]
* *Ruby:* {apm-ruby-ref}/configuration.html#config-environment[`environment`]
* *Real User Monitoring:* {apm-rum-ref}/configuration.html#environment[`environment`]

[[contextual-filters]]
==== Contextual filters

Contextual filters are ways you can filter your specific APM data on each individual page.
The filters shown are relevant to your data, and will persist between pages,
but only where they are applicable -- they are typically most useful in their original context.
As an example, if you select a host on the Services overview, then select a transaction group,
the host filter will still be applied.

These filters are very useful for quickly and easily removing noise from your data.
With just a click, you can filter your transactions by the transaction result,
host, container ID, Kubernetes pod, and more.

[role="screenshot"]
image::apm/images/local-filter.png[Local filters available in the APM app in Kibana]
Binary file modified docs/apm/images/apm-errors-overview.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 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 modified docs/apm/images/apm-query-bar.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 modified docs/apm/images/apm-services-overview.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 modified docs/apm/images/apm-traces.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 modified docs/apm/images/apm-transactions-overview.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 modified docs/apm/images/global-filters.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 modified docs/apm/images/jvm-metrics-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/developer/telemetry.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ To help us provide a good developer experience, we track some straightforward me
The operations we current report timing data for:

* Total execution time of `yarn kbn bootstrap`
* Total execution time of `@kbn/optimizer` runs as well as the following metadata about the runs: The number of bundles created, the number of bundles which were cached, usage of `--watch`, `--dist`, `--workers` and `--no-cache` flags, and the count of themes being built.

Along with the execution time of each execution, we ship the following information about your machine to the service:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ readonly links: {
};
readonly indexPatterns: {
readonly introduction: string;
readonly fieldFormattersNumber: string;
readonly fieldFormattersString: string;
};
readonly addData: string;
readonly kibana: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
```typescript
esFilters: {
FilterLabel: (props: import("./ui/filter_bar/filter_editor/lib/filter_label").FilterLabelProps) => JSX.Element;
FilterItem: (props: import("./ui/filter_bar/filter_item").FilterItemProps) => JSX.Element;
FILTERS: typeof FILTERS;
FilterStateStore: typeof FilterStateStore;
buildEmptyFilter: (isPinned: boolean, index?: string | undefined) => import("../common").Filter;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [SearchSessionInfoProvider](./kibana-plugin-plugins-data-public.searchsessioninfoprovider.md) &gt; [appendSessionStartTimeToName](./kibana-plugin-plugins-data-public.searchsessioninfoprovider.appendsessionstarttimetoname.md)

## SearchSessionInfoProvider.appendSessionStartTimeToName property

Append session start time to a session name, `true` by default

<b>Signature:</b>

```typescript
appendSessionStartTimeToName?: boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface SearchSessionInfoProvider<ID extends UrlGeneratorId = UrlGenera

| Property | Type | Description |
| --- | --- | --- |
| [appendSessionStartTimeToName](./kibana-plugin-plugins-data-public.searchsessioninfoprovider.appendsessionstarttimetoname.md) | <code>boolean</code> | Append session start time to a session name, <code>true</code> by default |
| [getName](./kibana-plugin-plugins-data-public.searchsessioninfoprovider.getname.md) | <code>() =&gt; Promise&lt;string&gt;</code> | User-facing name of the session. e.g. will be displayed in saved Search Sessions management list |
| [getUrlGeneratorData](./kibana-plugin-plugins-data-public.searchsessioninfoprovider.geturlgeneratordata.md) | <code>() =&gt; Promise&lt;{</code><br/><code> urlGeneratorId: ID;</code><br/><code> initialState: UrlGeneratorStateMapping[ID]['State'];</code><br/><code> restoreState: UrlGeneratorStateMapping[ID]['State'];</code><br/><code> }&gt;</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export declare class IndexPatternsServiceProvider implements Plugin<void, IndexP
| Method | Modifiers | Description |
| --- | --- | --- |
| [setup(core, { expressions })](./kibana-plugin-plugins-data-server.indexpatternsserviceprovider.setup.md) | | |
| [setup(core, { logger, expressions })](./kibana-plugin-plugins-data-server.indexpatternsserviceprovider.setup.md) | | |
| [start(core, { fieldFormats, logger })](./kibana-plugin-plugins-data-server.indexpatternsserviceprovider.start.md) | | |
Loading

0 comments on commit 4fcf884

Please sign in to comment.