Skip to content

Commit

Permalink
Merge branch 'master' into 56704
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Feb 12, 2020
2 parents 293a121 + 49bec6e commit 2cfb68b
Show file tree
Hide file tree
Showing 658 changed files with 17,356 additions and 5,883 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
# Kibana Alerting Services
/x-pack/legacy/plugins/alerting/ @elastic/kibana-alerting-services
/x-pack/legacy/plugins/actions/ @elastic/kibana-alerting-services
/x-pack/plugins/actions/ @elastic/kibana-alerting-services
/x-pack/plugins/event_log/ @elastic/kibana-alerting-services
/x-pack/plugins/task_manager/ @elastic/kibana-alerting-services
/x-pack/test/alerting_api_integration/ @elastic/kibana-alerting-services
Expand Down
65 changes: 65 additions & 0 deletions docs/accessibility.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[chapter]
[[accessibility]]
= Accessibility Statement for Kibana
++++
<titleabbrev>Accessibility</titleabbrev>
++++

Elastic is committed to ensuring digital accessibility for people with disabilities. We are continually improving the user experience, and strive toward ensuring our tools are usable by everyone.

[float]
[[accessibility-measures]]
== Measures to support accessibility
Elastic takes the following measures to ensure accessibility of Kibana:

* Maintains and incorporates an https://elastic.github.io/eui/[accessible component library].
* Provides continual accessibility training for our staff.
* Employs a third-party audit.

[float]
[[accessibility-conformance-status]]
== Conformance status
Kibana aims to meet https://www.w3.org/WAI/WCAG21/quickref/?currentsidebar=%23col_customize&levels=aaa&technologies=server%2Csmil%2Cflash%2Csl[WCAG 2.1 level AA] compliance. Currently, we can only claim to partially conform, meaning we do not fully meet all of the success criteria. However, we do try to take a broader view of accessibility, and go above and beyond the legal and regulatory standards to provide a good experience for all of our users.

[float]
[[accessibility-feedback]]
== Feedback
We welcome your feedback on the accessibility of Kibana. Please let us know if you encounter accessibility barriers on Kibana by either emailing us at accessibility@elastic.co or opening https://github.com/elastic/kibana/issues/new?labels=Project%3AAccessibility&template=Accessibility.md&title=%28Accessibility%29[an issue on GitHub].

[float]
[[accessibility-specs]]
== Technical specifications
Accessibility of Kibana relies on the following technologies to work with your web browser and any assistive technologies or plugins installed on your computer:

* HTML
* CSS
* JavaScript
* WAI-ARIA

[float]
[[accessibility-limitations-and-alternatives]]
== Limitations and alternatives
Despite our best efforts to ensure accessibility of Kibana, there are some limitations. Please https://github.com/elastic/kibana/issues/new?labels=Project%3AAccessibility&template=Accessibility.md&title=%28Accessibility%29[open an issue on GitHub] if you observe an issue not in this list.

Known limitations are in the following areas:

* *Charts*: We have a clear plan for the first steps of making charts accessible. We’ve opened this https://github.com/elastic/elastic-charts/issues/300[Charts accessibility ticket on GitHub] for tracking our progress.
* *Maps*: Maps might pose difficulties to users with vision disabilities. We welcome your input on making our maps accessible. Go to the https://github.com/elastic/kibana/issues/57271[Maps accessibility ticket on GitHub] to join the discussion and view our plans.
* *Tables*: Although generally accessible and marked-up as standard HTML tables with column headers, tables rarely make use of row headers and have poor captions. You will see incremental improvements as various applications adopt a new accessible component.
* *Color contrast*: Modern Kibana interfaces generally do not have color contrast issues. However, older code might fall below the recommended contrast levels. As we continue to update our code, this issue will phase out naturally.

To see individual tickets, view our https://github.com/elastic/kibana/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3AProject%3AAccessibility[GitHub issues with label "`Project:Accessibility`"].

[float]
[[accessibility-approach]]
== Assessment approach
Elastic assesses the accessibility of Kibana with the following approaches:

* *Self-evaluation*: Our employees are familiar with accessibility standards and review new designs and implemented features to confirm that they are accessible.
* *External evaluation*: We engage external contractors to help us conduct an independent assessment and generate a formal VPAT. Please email accessibility@elastic.co if you’d like a copy.
* *Automated evaluation*: We are starting to run https://www.deque.com/axe/[axe] on every page. See our current progress in the https://github.com/elastic/kibana/issues/51456[automated testing GitHub issue].

Manual testing largely focuses on screen reader support and is done on:

* VoiceOver on MacOS with Safari, Chrome and Edge
* NVDA on Windows with Chrome and Firefox
18 changes: 8 additions & 10 deletions docs/apm/filters.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,18 @@ Service environments are defined when configuring your APM agents.
It's very important 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:

|===
|*Environment configuration*
v|*Go:* {apm-go-ref}/configuration.html#config-environment[`ELASTIC_APM_ENVIRONMENT`]
*Java:* {apm-java-ref}/config-core.html#config-environment[`environment`]
*Node.js:* {apm-node-ref}/configuration.html#environment[`environment`]
*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`]
|===
* *Go:* {apm-go-ref}/configuration.html#config-environment[`ELASTIC_APM_ENVIRONMENT`]
* *Java:* {apm-java-ref}/config-core.html#config-environment[`environment`]
* *.NET* {apm-dotnet-ref}/config-core.html#config-environment[`Environment`]
* *Node.js:* {apm-node-ref}/configuration.html#environment[`environment`]
* *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

Local filters are ways you can filter your specific APM data on each individual page.
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,
Expand Down
Binary file modified docs/apm/images/apm-agent-configuration.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-distributed-tracing.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-error-group.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-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-errors-watcher-assistant.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-span-detail.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/apm-transaction-annotation.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-transaction-response-dist.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-transaction-sample.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 added docs/apm/images/apm-transactions-table.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.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions docs/apm/spans.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The span timeline visualization is a bird's-eye view of what your application wa
This makes it useful for visualizing where the selected transaction spent most of its time.

[role="screenshot"]
image::apm/images/apm-distributed-tracing.png[Example view of the distributed tracing in APM app in Kibana]
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.
For example, in the below screenshot we've clicked on an SQL Select database query.
Expand All @@ -35,6 +35,3 @@ 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* in the upper right hand corner of the page.

[role="screenshot"]
image::apm/images/apm-transaction-sample.png[Example of distributed trace colors in the APM app in Kibana]
67 changes: 44 additions & 23 deletions docs/apm/transactions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,74 @@
=== Transaction overview

TIP: A {apm-overview-ref-v}/transactions.html[transaction] describes an event captured by an Elastic APM agent instrumenting a service.
The APM agents automatically collect performance metrics on HTTP requests, database queries, and much more.
APM agents automatically collect performance metrics on HTTP requests, database queries, and much more.

Selecting a <<services,*service*>> brings you to the *transactions* overview.
The *time spent by span type*, *transaction duration* and *requests per minute* chart display information on all transactions associated with the selected service.
The *Transactions* table, however, provides only a list of _transaction groups_ for the selected service.
In other words, this view groups all transactions of the same name together, and only displays one transaction for each group.

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

*Time spent by span type* -- Most agents support breakdown graphs in the APM app.
This graph is an easy way to visualize where your application is spending most of its time.
For example, is your app spending time in external calls, database processing, or application code execution?
The *time spent by span type*, *transaction duration*, and *requests per minute* chart display information on all transactions associated with the selected service:

*Time spent by span type*::
Visualize where your application is spending most of its time.
For example, is your app spending time in external calls, database processing, or application code execution?
+
The time a transaction took to complete is also recorded and displayed on the chart under the "app" label.
"app" indicates that something was happening within the application, but we're not sure exactly what.
This could be a sign that the agent does not have auto-instrumentation for whatever was happening during that time.

+
It's important to note that if you have asynchronous spans, the sum of all span times may exceed the duration of the transaction.

*Transaction duration* shows the response times for this service and is broken down into average, 95th, and 99th percentile.
*Transaction duration*::
Response times for this service, broken down into average, 95th, and 99th percentile.
If there's a weird spike that you'd like to investigate,
you can simply zoom in on the graph - this will adjust the specific time range,
and all of the data on the page will update accordingly.

*Requests per minute* is divided into response codes: 2xx, 3xx, 4xx, etc.,
*Requests per minute*::
Visualize response codes: `2xx`, `3xx`, `4xx`, etc.,
and is useful for determining if you're serving more of one code than you typically do.
Like in the Transaction duration graph, you can zoom in on anomalies to further investigate them.

The *Transactions* table is similar to the <<traces,traces>> overview and shows the name of each transaction occurring in the selected service.
Transactions with the same name are grouped together and only shown once in this table.
[[transactions-table]]
==== Transactions table

The *Transactions* table displays a list of _transaction groups_ for the selected service.
In other words, this view groups all transactions of the same name together,
and only displays one entry for each group.

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

By default, transaction groups are sorted by _Impact_.
Impact helps show the most used and slowest endpoints in your service - in other words,
it's the collective amount of pain a specific endpoint is causing your users.
If there's a particular endpoint you're worried about, you can click on it to view the <<transaction-details, transaction details>>.

[IMPORTANT]
====
The transaction overview will only display helpful information when the transactions in your service are named correctly.
Elastic APM Agents come with built-in support for popular frameworks out-of-the-box.
However, if you only see one route in the Transaction overview page, or if you have transactions named "unknown route",
If you only see one route in the Transactions table, or if you have transactions named "unknown route",
it could be a symptom that the agent either wasn't installed correctly or doesn't support your framework.
For further details, including troubleshooting and custom implementation instructions,
refer to the documentation for each {apm-agents-ref}[APM Agent] you've implemented.
====

[[transactions-annotations]]
==== Transaction annotations

For enhanced visibility into your deployments, we offer deployment annotations on all transaction charts.
This feature automatically tags new deployments, so you can easily see if your deploy has increased response times
for an end-user, or if the memory/CPU footprint of your application has increased.
Being able to quickly identify bad deployments enables you to rollback and fix issues without causing costly outages.

Deployment annotations are automatically enabled, and appear when the `service.version` of your app changes.

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


[[rum-transaction-overview]]
==== RUM Transaction overview

Expand All @@ -75,23 +95,24 @@ It's important to note that all of these graphs show data from every transaction
[role="screenshot"]
image::apm/images/apm-transaction-response-dist.png[Example view of response time distribution]

A single sampled transaction is also displayed.
This sampled transaction is based on your selection in the *Transactions duration distribution*.
You can update the sampled transaction by selecting a new _bucket_ in the transactions duration distribution graph.
Up to ten sampled transactions are also displayed.
These sampled transactions are based on your selection in the *Transactions duration distribution*.
You can update the sampled transactions by selecting a new _bucket_ in the transactions duration distribution graph.
The number of requests per bucket is displayed when hovering over the graph, and the selected bucket is highlighted to stand out.

[role="screenshot"]
image::apm/images/apm-transaction-duration-dist.png[Example view of transactions duration distribution graph]

Let's look at an example.
In the screenshot below,
you'll notice most of our requests fall into buckets on the left side of the graph,
you'll notice most of the requests fall into buckets on the left side of the graph,
with a long tail of smaller buckets to the right.
This is a typical distribution, and indicates most of our requests were served quickly - awesome!
It's the requests on the right, the ones taking longer than average, that we probably want to focus on.
By clicking on these buckets,
we're presented with a span timeline waterfall showing what a typical request in that bucket was doing.
By investigating this timeline waterfall, we can hopefully see why it was slow and then implement a fix.
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.
By investigating this timeline waterfall, we can hopefully determine _why_ this request was slow and then implement a fix.

[role="screenshot"]
image::apm/images/apm-transaction-sample.png[Example view of transactions sample]
Expand Down
2 changes: 2 additions & 0 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[]

include::user/index.asciidoc[]

include::accessibility.asciidoc[]

include::limitations.asciidoc[]

include::release-notes/highlights.asciidoc[]
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-interpreter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"license": "Apache-2.0",
"scripts": {
"interpreter:peg": "pegjs common/lib/grammar.peg",
"interpreter:peg": "pegjs src/common/lib/grammar.peg",
"build": "node scripts/build",
"kbn:bootstrap": "node scripts/build --dev",
"kbn:watch": "node scripts/build --dev --watch"
Expand Down
4 changes: 1 addition & 3 deletions packages/kbn-interpreter/src/common/lib/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ export class Registry {
}

register(fn) {
if (typeof fn !== 'function') throw new Error(`Register requires an function`);

const obj = fn();
const obj = typeof fn === 'function' ? fn() : fn;

if (typeof obj !== 'object' || !obj[this._prop]) {
throw new Error(`Registered functions must return an object with a ${this._prop} property`);
Expand Down
12 changes: 6 additions & 6 deletions packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88442,7 +88442,7 @@ module.exports = function kindOf(val) {
};

function ctorName(val) {
return val.constructor ? val.constructor.name : null;
return typeof val.constructor === 'function' ? val.constructor.name : null;
}

function isArray(val) {
Expand Down Expand Up @@ -88653,7 +88653,7 @@ module.exports = function kindOf(val) {
};

function ctorName(val) {
return val.constructor ? val.constructor.name : null;
return typeof val.constructor === 'function' ? val.constructor.name : null;
}

function isArray(val) {
Expand Down Expand Up @@ -88844,7 +88844,7 @@ module.exports = function kindOf(val) {
};

function ctorName(val) {
return val.constructor ? val.constructor.name : null;
return typeof val.constructor === 'function' ? val.constructor.name : null;
}

function isArray(val) {
Expand Down Expand Up @@ -101921,7 +101921,7 @@ module.exports = function kindOf(val) {
};

function ctorName(val) {
return val.constructor ? val.constructor.name : null;
return typeof val.constructor === 'function' ? val.constructor.name : null;
}

function isArray(val) {
Expand Down Expand Up @@ -104780,7 +104780,7 @@ module.exports = function kindOf(val) {
};

function ctorName(val) {
return val.constructor ? val.constructor.name : null;
return typeof val.constructor === 'function' ? val.constructor.name : null;
}

function isArray(val) {
Expand Down Expand Up @@ -108562,7 +108562,7 @@ __webpack_require__.r(__webpack_exports__);
* to Kibana itself.
*/

const isKibanaDep = depVersion => depVersion.includes('../../kibana/');
const isKibanaDep = depVersion => depVersion.includes('../../packages/');
/**
* This prepares the dependencies for an _external_ project.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "quux",
"version": "1.0.0",
"dependencies": {
"@kbn/foo": "link:../../kibana/packages/foo"
"@kbn/foo": "link:../../packages/foo"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { Project } from '../utils/project';
* to the Kibana root directory or `../kibana-extra/{plugin}` relative
* to Kibana itself.
*/
const isKibanaDep = (depVersion: string) => depVersion.includes('../../kibana/');
const isKibanaDep = (depVersion: string) => depVersion.includes('../../packages/');

/**
* This prepares the dependencies for an _external_ project.
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-utility-types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ type B = UnwrapPromise<A>; // string
- `ShallowPromise<T>` &mdash; Same as `Promise` type, but it flat maps the wrapped type.
- `UnwrapObservable<T>` &mdash; Returns wrapped type of an observable.
- `UnwrapPromise<T>` &mdash; Returns wrapped type of a promise.
- `UnwrapPromiseOrReturn<T>` &mdash; Returns wrapped type of a promise or the type itself, if it isn't a promise.
5 changes: 5 additions & 0 deletions packages/kbn-utility-types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ export type ShallowPromise<T> = T extends Promise<infer U> ? Promise<U> : Promis
*/
export type UnwrapPromise<T extends Promise<any>> = PromiseType<T>;

/**
* Returns wrapped type of a promise, or returns type as is, if it is not a promise.
*/
export type UnwrapPromiseOrReturn<T> = T extends Promise<infer U> ? U : T;

/**
* Minimal interface for an object resembling an `Observable`.
*/
Expand Down
Loading

0 comments on commit 2cfb68b

Please sign in to comment.