Skip to content

Commit

Permalink
Merge branch master into canvas-move-files
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey Robertson committed May 5, 2020
2 parents 2dab77b + f5e8f3d commit f6cb76a
Show file tree
Hide file tree
Showing 820 changed files with 22,201 additions and 5,879 deletions.
4 changes: 2 additions & 2 deletions .ci/end2end.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pipeline {
BASE_DIR = 'src/github.com/elastic/kibana'
HOME = "${env.WORKSPACE}"
APM_ITS = 'apm-integration-testing'
CYPRESS_DIR = 'x-pack/legacy/plugins/apm/e2e'
CYPRESS_DIR = 'x-pack/plugins/apm/e2e'
PIPELINE_LOG_LEVEL = 'DEBUG'
}
options {
Expand All @@ -39,7 +39,7 @@ pipeline {
shallow: false, reference: "/var/lib/jenkins/.git-references/kibana.git")
script {
dir("${BASE_DIR}"){
def regexps =[ "^x-pack/legacy/plugins/apm/.*" ]
def regexps =[ "^x-pack/plugins/apm/.*" ]
env.APM_UPDATED = isGitRegionMatch(patterns: regexps)
}
}
Expand Down
2 changes: 1 addition & 1 deletion .ci/es-snapshots/Jenkinsfile_verify_es
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ currentBuild.description = "ES: ${SNAPSHOT_VERSION}<br />Kibana: ${params.branch

def SNAPSHOT_MANIFEST = "https://storage.googleapis.com/kibana-ci-es-snapshots-daily/${SNAPSHOT_VERSION}/archives/${SNAPSHOT_ID}/manifest.json"

kibanaPipeline(timeoutMinutes: 120) {
kibanaPipeline(timeoutMinutes: 150) {
catchErrors {
slackNotifications.onFailure(
title: ":broken_heart: *<${env.BUILD_URL}|[${SNAPSHOT_VERSION}] ES Snapshot Verification Failure>*",
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ target
/src/plugins/vis_type_timelion/public/_generated_/**
/src/plugins/vis_type_timelion/public/webpackShims/jquery.flot.*
/x-pack/legacy/plugins/**/__tests__/fixtures/**
/x-pack/legacy/plugins/apm/e2e/cypress/**/snapshots.js
/x-pack/plugins/apm/e2e/cypress/**/snapshots.js
/x-pack/plugins/canvas/canvas_plugin
/x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts
/x-pack/plugins/canvas/shareable_runtime/build
Expand Down
23 changes: 19 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ module.exports = {
},
},

/**
* New Platform client-side
*/
{
files: ['{src,x-pack}/plugins/*/public/**/*.{js,ts,tsx}'],
rules: {
'import/no-commonjs': 'error',
},
},

/**
* Files that require Elastic license headers instead of Apache 2.0 header
*/
Expand Down Expand Up @@ -183,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 @@ -306,7 +321,7 @@ module.exports = {
{
files: [
'x-pack/test/functional/apps/**/*.js',
'x-pack/legacy/plugins/apm/**/*.js',
'x-pack/plugins/apm/**/*.js',
'test/*/config.ts',
'test/*/config_open.ts',
'test/*/{tests,test_suites,apis,apps}/**/*',
Expand Down Expand Up @@ -393,7 +408,7 @@ module.exports = {
'x-pack/**/*.test.js',
'x-pack/test_utils/**/*',
'x-pack/gulpfile.js',
'x-pack/legacy/plugins/apm/public/utils/testHelpers.js',
'x-pack/plugins/apm/public/utils/testHelpers.js',
],
rules: {
'import/no-extraneous-dependencies': [
Expand Down Expand Up @@ -519,15 +534,15 @@ module.exports = {
* APM overrides
*/
{
files: ['x-pack/legacy/plugins/apm/**/*.js'],
files: ['x-pack/plugins/apm/**/*.js'],
rules: {
'no-unused-vars': ['error', { ignoreRestSiblings: true }],
'no-console': ['warn', { allow: ['error'] }],
},
},
{
plugins: ['react-hooks'],
files: ['x-pack/legacy/plugins/apm/**/*.{ts,tsx}'],
files: ['x-pack/plugins/apm/**/*.{ts,tsx}'],
rules: {
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': ['error', { additionalHooks: '^useFetcher$' }],
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 @@ -66,7 +66,7 @@
/x-pack/plugins/drilldowns/ @elastic/kibana-app-arch

# APM
/x-pack/legacy/plugins/apm/ @elastic/apm-ui
/x-pack/plugins/apm/ @elastic/apm-ui
/x-pack/plugins/apm/ @elastic/apm-ui
/x-pack/test/functional/apps/apm/ @elastic/apm-ui
/src/legacy/core_plugins/apm_oss/ @elastic/apm-ui
Expand Down
5 changes: 2 additions & 3 deletions .github/paths-labeller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
- "Feature:ExpressionLanguage":
- "src/plugins/expressions/**/*.*"
- "src/plugins/bfetch/**/*.*"
- "Team:apm"
- "Team:apm":
- "x-pack/plugins/apm/**/*.*"
- "x-pack/plugins/apm/**/*.*"
- "x-pack/legacy/plugins/apm/**/*.*"
- "Team:uptime":
- "x-pack/plugins/uptime/**/*.*"
- "x-pack/legacy/plugins/uptime/**/*.*"
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ package-lock.json
*.sublime-*
npm-debug.log*
.tern-project
x-pack/legacy/plugins/apm/tsconfig.json
x-pack/plugins/apm/tsconfig.json
apm.tsconfig.json
/x-pack/legacy/plugins/apm/e2e/snapshots.js
/x-pack/plugins/apm/e2e/snapshots.js
2 changes: 1 addition & 1 deletion config/kibana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# the username and password that the Kibana server uses to perform maintenance on the Kibana
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
# is proxied through the Kibana server.
#elasticsearch.username: "kibana"
#elasticsearch.username: "kibana_system"
#elasticsearch.password: "pass"

# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
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,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,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 f6cb76a

Please sign in to comment.