Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into lens/treemap-catego…
Browse files Browse the repository at this point in the history
…ries
  • Loading branch information
wylieconlon committed May 6, 2020
2 parents 631e384 + 46b91cc commit 666f28e
Show file tree
Hide file tree
Showing 1,750 changed files with 17,406 additions and 6,306 deletions.
1 change: 1 addition & 0 deletions .backportrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"targetBranchChoices": [
{ "name": "master", "checked": true },
{ "name": "7.x", "checked": true },
"7.8",
"7.7",
"7.6",
"7.5",
Expand Down
8 changes: 4 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ target
/src/plugins/vis_type_timelion/public/webpackShims/jquery.flot.*
/x-pack/legacy/plugins/**/__tests__/fixtures/**
/x-pack/plugins/apm/e2e/cypress/**/snapshots.js
/x-pack/legacy/plugins/canvas/canvas_plugin
/x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts
/x-pack/legacy/plugins/canvas/shareable_runtime/build
/x-pack/legacy/plugins/canvas/storybook
/x-pack/plugins/canvas/canvas_plugin
/x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts
/x-pack/plugins/canvas/shareable_runtime/build
/x-pack/plugins/canvas/storybook
/x-pack/plugins/monitoring/public/lib/jquery_flot
/x-pack/legacy/plugins/infra/common/graphql/types.ts
/x-pack/legacy/plugins/infra/public/graphql/types.ts
Expand Down
27 changes: 16 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports = {
},
},
{
files: ['x-pack/legacy/plugins/canvas/**/*.{js,ts,tsx}'],
files: ['x-pack/plugins/canvas/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
Expand Down Expand Up @@ -193,6 +193,11 @@ module.exports = {
{
basePath: __dirname,
zones: [
{
target: ['(src|x-pack)/**/*', '!src/core/**/*'],
from: ['src/core/utils/**/*'],
errorMessage: `Plugins may only import from src/core/server and src/core/public.`,
},
{
target: [
'(src|x-pack)/legacy/**/*',
Expand Down Expand Up @@ -888,7 +893,7 @@ module.exports = {
* Canvas overrides
*/
{
files: ['x-pack/legacy/plugins/canvas/**/*.js'],
files: ['x-pack/plugins/canvas/**/*.js'],
rules: {
radix: 'error',

Expand Down Expand Up @@ -932,12 +937,12 @@ module.exports = {
},
{
files: [
'x-pack/legacy/plugins/canvas/gulpfile.js',
'x-pack/legacy/plugins/canvas/scripts/*.js',
'x-pack/legacy/plugins/canvas/tasks/*.js',
'x-pack/legacy/plugins/canvas/tasks/**/*.js',
'x-pack/legacy/plugins/canvas/__tests__/**/*.js',
'x-pack/legacy/plugins/canvas/**/{__tests__,__test__,__jest__,__fixtures__,__mocks__}/**/*.js',
'x-pack/plugins/canvas/gulpfile.js',
'x-pack/plugins/canvas/scripts/*.js',
'x-pack/plugins/canvas/tasks/*.js',
'x-pack/plugins/canvas/tasks/**/*.js',
'x-pack/plugins/canvas/__tests__/**/*.js',
'x-pack/plugins/canvas/**/{__tests__,__test__,__jest__,__fixtures__,__mocks__}/**/*.js',
],
rules: {
'import/no-extraneous-dependencies': [
Expand All @@ -950,7 +955,7 @@ module.exports = {
},
},
{
files: ['x-pack/legacy/plugins/canvas/canvas_plugin_src/**/*.js'],
files: ['x-pack/plugins/canvas/canvas_plugin_src/**/*.js'],
globals: { canvas: true, $: true },
rules: {
'import/no-unresolved': [
Expand All @@ -962,13 +967,13 @@ module.exports = {
},
},
{
files: ['x-pack/legacy/plugins/canvas/public/**/*.js'],
files: ['x-pack/plugins/canvas/public/**/*.js'],
env: {
browser: true,
},
},
{
files: ['x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts/**/*.js'],
files: ['x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts/**/*.js'],
env: {
jquery: true,
},
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
/x-pack/legacy/plugins/beats_management/ @elastic/beats

# Canvas
/x-pack/legacy/plugins/canvas/ @elastic/kibana-canvas
/x-pack/plugins/canvas/ @elastic/kibana-canvas

# Observability UIs
/x-pack/legacy/plugins/infra/ @elastic/logs-metrics-ui
Expand Down
4 changes: 2 additions & 2 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ files:
- 'src/plugins/vis_type_vislib/**/*.s+(a|c)ss'
- 'src/plugins/vis_type_xy/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/security/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/canvas/**/*.s+(a|c)ss'
- 'x-pack/plugins/canvas/**/*.s+(a|c)ss'
- 'x-pack/plugins/triggers_actions_ui/**/*.s+(a|c)ss'
- 'x-pack/plugins/lens/**/*.s+(a|c)ss'
- 'x-pack/plugins/cross_cluster_replication/**/*.s+(a|c)ss'
- 'x-pack/legacy/plugins/maps/**/*.s+(a|c)ss'
- 'x-pack/plugins/maps/**/*.s+(a|c)ss'
ignore:
- 'x-pack/legacy/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss'
- 'x-pack/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss'
rules:
quotes:
- 2
Expand Down
33 changes: 24 additions & 9 deletions docs/apm/spans.asciidoc
Original file line number Diff line number Diff line change
@@ -1,38 +1,53 @@
[role="xpack"]
[[spans]]
=== Span timeline
=== Trace sample timeline

TIP: A {apm-overview-ref-v}/transaction-spans.html[span] is the duration of a single event.
Spans are automatically captured by APM agents, and you can also define custom spans.
Each span has a type and is defined by a different color in the timeline/waterfall visualization.

The span timeline visualization is a bird's-eye view of what your application was doing while it was trying to respond to the request that came in.
The trace sample timeline visualization is a bird's-eye view of what your application was doing while it was trying to respond to a request.
This makes it useful for visualizing where the selected transaction spent most of its time.

[role="screenshot"]
image::apm/images/apm-transaction-sample.png[Example of distributed trace colors in the APM app in Kibana]

View a span in detail by clicking on it in the timeline waterfall.
When you click on an SQL Select database query,
For example, when you click on an SQL Select database query,
the information displayed includes the actual SQL that was executed, how long it took,
and the percentage of the trace's total time.
You also get a stack trace, which shows the SQL query in your code.
Finally, APM knows which files are your code and which are just modules or libraries that you've installed.
These library frames will be minimized by default in order to show you the most relevant stack trace.

TIP: A {apm-overview-ref-v}/transaction-spans.html[span] is the duration of a single event.
Spans are automatically captured by APM agents, and you can also define custom spans.
Each span has a type and is defined by a different color in the timeline/waterfall visualization.

[role="screenshot"]
image::apm/images/apm-span-detail.png[Example view of a span detail in the APM app in Kibana]

If your span timeline is colorful, it's indicative of a <<distributed-tracing,distributed trace>>.
[float]
[[distributed-tracing]]
==== Distributed tracing

If your trace sample timeline is colorful, it's indicative of a distributed trace.
Services in a distributed trace are separated by color and listed in the order they occur.

[role="screenshot"]
image::apm/images/apm-services-trace.png[Example of distributed trace colors in the APM app in Kibana]

Don't forget; a distributed trace includes more than one transaction.
As application architectures are shifting from monolithic to more distributed, service-based architectures,
distributed tracing has become a crucial feature of modern application performance monitoring.
It allows you to trace requests through your service architecture automatically, and visualize those traces in one single view in the APM app.
From initial web requests to your front-end service, to queries made to your back-end services,
this makes finding possible bottlenecks throughout your application much easier and faster.

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

Don't forget; by definition, a distributed trace includes more than one transaction.
When viewing these distributed traces in the timeline waterfall, you'll see this image:apm/images/transaction-icon.png[APM icon] icon,
which indicates the next transaction in the trace.
These transactions can be expanded and viewed in detail by clicking on them.

After exploring these traces,
you can return to the full trace by clicking *View full trace*.

TIP: Distributed tracing is supported by all APM agents, and there's no additional configuration needed.
24 changes: 1 addition & 23 deletions docs/apm/traces.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

TIP: Traces link together related transactions to show an end-to-end performance of how a request was served
and which services were part of it.
In addition to the Traces overview, you can view your application traces in the <<spans,span timeline waterfall>>.
In addition to the Traces overview, you can view your application traces in the <<spans,trace sample timeline waterfall>>.

The *Traces* overview displays the entry transaction for all traces in your application.
If you're using <<distributed-tracing>>, this view is key to finding the critical paths within your application.
Expand All @@ -17,25 +17,3 @@ If there's a particular endpoint you're worried about, you can click on it to vi

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

[float]
[[distributed-tracing]]
==== Distributed tracing

Elastic APM supports distributed tracing.
Distributed tracing is a key feature of modern application performance monitoring as application architectures are shifting from monolithic to more distributed,
service-based architectures.

Distributed tracing allows APM users to automatically trace requests all the way through the service architecture,
and visualize those traces in one single view in the APM app.
This is accomplished by tracing all of the requests, from the initial web request to your front-end service,
to queries made to your back-end services.
This makes finding possible bottlenecks throughout your application much easier and faster.

By definition, a distributed trace includes more than one transaction.
You can use the <<spans,span timeline visualization>> to view a waterfall display of all of the transactions from individual services that are connected in a trace.

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

TIP: Distributed tracing is supported by all APM agents, and there's no additional configuration needed.
2 changes: 1 addition & 1 deletion docs/apm/transactions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ It's the requests on the right, the ones taking longer than average, that we pro

When you select one of these buckets,
you're presented with up to ten trace samples.
Each sample has a span timeline waterfall that shows what a typical request in that bucket was doing.
Each sample has a trace timeline waterfall that shows what a typical request in that bucket was doing.
By investigating this timeline waterfall, we can hopefully determine _why_ this request was slow and then implement a fix.

[role="screenshot"]
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-core-public](./kibana-plugin-core-public.md) &gt; [AppCategory](./kibana-plugin-core-public.appcategory.md) &gt; [id](./kibana-plugin-core-public.appcategory.id.md)

## AppCategory.id property

Unique identifier for the categories

<b>Signature:</b>

```typescript
id: string;
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface AppCategory
| --- | --- | --- |
| [ariaLabel](./kibana-plugin-core-public.appcategory.arialabel.md) | <code>string</code> | If the visual label isn't appropriate for screen readers, can override it here |
| [euiIconType](./kibana-plugin-core-public.appcategory.euiicontype.md) | <code>string</code> | Define an icon to be used for the category If the category is only 1 item, and no icon is defined, will default to the product icon Defaults to initials if no icon is defined |
| [id](./kibana-plugin-core-public.appcategory.id.md) | <code>string</code> | Unique identifier for the categories |
| [label](./kibana-plugin-core-public.appcategory.label.md) | <code>string</code> | Label used for cateogry name. Also used as aria-label if one isn't set. |
| [order](./kibana-plugin-core-public.appcategory.order.md) | <code>number</code> | The order that categories will be sorted in Prefer large steps between categories to allow for further editing (Default categories are in steps of 1000) |

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [assertNever](./kibana-plugin-core-public.assertnever.md)

## assertNever() function

Can be used in switch statements to ensure we perform exhaustive checks, see https://www.typescriptlang.org/docs/handbook/advanced-types.html\#exhaustiveness-checking

<b>Signature:</b>

```typescript
export declare function assertNever(x: never): never;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| x | <code>never</code> | |

<b>Returns:</b>

`never`

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [ChromeStart](./kibana-plugin-core-public.chromestart.md) &gt; [getNavType$](./kibana-plugin-core-public.chromestart.getnavtype_.md)

## ChromeStart.getNavType$() method

Get the navigation type TODO \#64541 Can delete

<b>Signature:</b>

```typescript
getNavType$(): Observable<NavType>;
```
<b>Returns:</b>

`Observable<NavType>`

Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ core.chrome.setHelpExtension(elem => {
| [getHelpExtension$()](./kibana-plugin-core-public.chromestart.gethelpextension_.md) | Get an observable of the current custom help conttent |
| [getIsNavDrawerLocked$()](./kibana-plugin-core-public.chromestart.getisnavdrawerlocked_.md) | Get an observable of the current locked state of the nav drawer. |
| [getIsVisible$()](./kibana-plugin-core-public.chromestart.getisvisible_.md) | Get an observable of the current visibility state of the chrome. |
| [getNavType$()](./kibana-plugin-core-public.chromestart.getnavtype_.md) | Get the navigation type TODO \#64541 Can delete |
| [removeApplicationClass(className)](./kibana-plugin-core-public.chromestart.removeapplicationclass.md) | Remove a className added with <code>addApplicationClass()</code>. If className is unknown it is ignored. |
| [setAppTitle(appTitle)](./kibana-plugin-core-public.chromestart.setapptitle.md) | Sets the current app's title |
| [setBadge(badge)](./kibana-plugin-core-public.chromestart.setbadge.md) | Override the current badge |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [deepFreeze](./kibana-plugin-core-public.deepfreeze.md)

## deepFreeze() function

Apply Object.freeze to a value recursively and convert the return type to Readonly variant recursively

<b>Signature:</b>

```typescript
export declare function deepFreeze<T extends Freezable>(object: T): RecursiveReadonly<T>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| object | <code>T</code> | |

<b>Returns:</b>

`RecursiveReadonly<T>`

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [Freezable](./kibana-plugin-core-public.freezable.md)

## Freezable type


<b>Signature:</b>

```typescript
export declare type Freezable = {
[k: string]: any;
} | any[];
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [getFlattenedObject](./kibana-plugin-core-public.getflattenedobject.md)

## getFlattenedObject() function

Flattens a deeply nested object to a map of dot-separated paths pointing to all primitive values \*\*and arrays\*\* from `rootValue`<!-- -->.

example: getFlattenedObject(<!-- -->{ a: { b: 1, c: \[2,3\] } }<!-- -->) // =<!-- -->&gt; { 'a.b': 1, 'a.c': \[2,3\] }

<b>Signature:</b>

```typescript
export declare function getFlattenedObject(rootValue: Record<string, any>): {
[key: string]: any;
};
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| rootValue | <code>Record&lt;string, any&gt;</code> | |

<b>Returns:</b>

`{
[key: string]: any;
}`

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [isRelativeUrl](./kibana-plugin-core-public.isrelativeurl.md)

## isRelativeUrl() function

Determine if a url is relative. Any url including a protocol, hostname, or port is not considered relative. This means that absolute \*paths\* are considered to be relative \*urls\*

<b>Signature:</b>

```typescript
export declare function isRelativeUrl(candidatePath: string): boolean;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| candidatePath | <code>string</code> | |

<b>Returns:</b>

`boolean`

Loading

0 comments on commit 666f28e

Please sign in to comment.