Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into elastic#17576
Browse files Browse the repository at this point in the history
  • Loading branch information
sulemanof committed Feb 5, 2019
2 parents 09f375b + 07add3b commit d01fe5e
Show file tree
Hide file tree
Showing 2,688 changed files with 139,213 additions and 83,702 deletions.
1 change: 0 additions & 1 deletion .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ tar -cf "$HOME/.kibana/bootstrap_cache/master.tar" \
x-pack/node_modules \
x-pack/plugins/*/node_modules \
x-pack/plugins/reporting/.chromium \
x-pack/plugins/reporting/.phantom \
test/plugin_functional/plugins/*/node_modules \
.es;
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bower_components
/packages/kbn-ui-framework/dist
/packages/kbn-ui-framework/doc_site/build
/packages/kbn-ui-framework/generator-kui/*/templates/
/x-pack/plugins/gis/public/vendor/**
/x-pack/plugins/maps/public/vendor/**
/x-pack/coverage
/x-pack/build
/x-pack/plugins/**/__tests__/fixtures/**
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ module.exports = {
* GIS overrides
*/
{
files: ['x-pack/plugins/gis/**/*'],
files: ['x-pack/plugins/maps/**/*'],
rules: {
'react/prefer-stateless-function': [0, { ignorePureComponents: false }],
},
Expand Down
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
# Canvas
/x-pack/plugins/canvas/ @elastic/kibana-canvas

# Machine Learning
/x-pack/plugins/ml/ @elastic/ml-ui

# Security
/x-pack/plugins/security/ @elastic/kibana-security
/x-pack/plugins/spaces/ @elastic/kibana-security
/src/server/csp/ @elastic/kibana-security

# Design
**/*.scss @elastic/kibana-design
Expand Down
5 changes: 5 additions & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
"common.ui": "src/ui",
"server": "src/server",
"console": "src/legacy/core_plugins/console",
"core": "src/core",
"inputControl": "src/legacy/core_plugins/input_control_vis",
"inspectorViews": "src/legacy/core_plugins/inspector_views",
"interpreter": "src/legacy/core_plugins/interpreter",
"kbn": "src/legacy/core_plugins/kibana",
"kbnDocViews": "src/legacy/core_plugins/kbn_doc_views",
"kbnVislibVisTypes": "src/legacy/core_plugins/kbn_vislib_vis_types",
"markdownVis": "src/legacy/core_plugins/markdown_vis",
"metricVis": "src/legacy/core_plugins/metric_vis",
Expand All @@ -26,6 +29,7 @@
"xpack.idxMgmt": "x-pack/plugins/index_management",
"xpack.indexLifecycleMgmt": "x-pack/plugins/index_lifecycle_management",
"xpack.infra": "x-pack/plugins/infra",
"xpack.kueryAutocomplete": "x-pack/plugins/kuery_autocomplete",
"xpack.licenseMgmt": "x-pack/plugins/license_management",
"xpack.ml": "x-pack/plugins/ml",
"xpack.logstash": "x-pack/plugins/logstash",
Expand All @@ -42,6 +46,7 @@
"xpack.watcher": "x-pack/plugins/watcher"
},
"exclude": [
"src/core/public/fatal_errors/get_error_info.ts",
"src/ui/ui_render/bootstrap/app_bootstrap.js",
"src/ui/ui_render/ui_render_mixin.js",
"x-pack/plugins/infra/public/graphql/types.ts",
Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ Operations::
* Creates separate startup scripts for development and production {pull}13806[#13806]
* Sets default port based on protocol {pull}21564[#21564]
* Removes deprecated `/shorten` API {pull}21861[#21861]
* Plugin installer defers optimization step until server start {pull}26983[#26983]

[float]
[[deprecation-7.0.0]]
Expand Down
3 changes: 3 additions & 0 deletions docs/api/saved-objects/bulk_create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ contains the following properties:
`attributes` (required)::
(object) The data to persist

`references` (optional)::
(array) An array of objects with `name`, `id`, and `type` properties that describe the other saved objects this object references. The `name` can be used in the attributes to refer to the other saved object, but never the `id`, which may be updated automatically in the future during migrations or import/export.

`version` (optional)::
(number) Enables specifying a version

Expand Down
2 changes: 2 additions & 0 deletions docs/api/saved-objects/create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Note: You cannot access this endpoint via the Console in Kibana.
`attributes` (required)::
(object) The data to persist

`references` (optional)::
(array) An array of objects with `name`, `id`, and `type` properties that describe the other saved objects this object references. The `name` can be used in the attributes to refer to the other saved object, but never the `id`, which may be updated automatically in the future during migrations or import/export.

==== Examples

Expand Down
4 changes: 4 additions & 0 deletions docs/api/saved-objects/find.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ Note: You cannot access this endpoint via the Console in Kibana.
(number) The page of objects to return
`search` (optional)::
(string) A {ref}/query-dsl-simple-query-string-query.html[simple_query_string] Elasticsearch query to filter the objects in the response
`default_search_operator` (optional)::
(string) The default operator to use for the `simple_query_string`
`search_fields` (optional)::
(array|string) The fields to perform the `simple_query_string` parsed query against
`fields` (optional)::
(array|string) The fields to return in the response
`sort_field` (optional)::
(string) The field on which the response will be sorted
`has_reference` (optional)::
(object) Filters to objects having a relationship with the type and id combination

[NOTE]
==============================================
Expand Down
2 changes: 2 additions & 0 deletions docs/api/saved-objects/update.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Note: You cannot access this endpoint via the Console in Kibana.
`attributes` (required)::
(object) The data to persist

`references` (optional)::
(array) An array of objects with `name`, `id`, and `type` properties that describe the other saved objects this object references. The `name` can be used in the attributes to refer to the other saved object, but never the `id`, which may be updated automatically in the future during migrations or import/export.

==== Examples

Expand Down
35 changes: 17 additions & 18 deletions docs/apm/bottlenecks.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@
[[apm-bottlenecks]]
== Visualizing Application Bottlenecks

Elastic APM monitors transactions and errors in your application. A transaction
can be a request to your server or a batch job or a custom transaction type.
You can see information about response times, requests per minute, and status
codes per endpoint. You can also dive into a specific request sample and get a
complete waterfall view of what your application is spending its time on. For
example, you might see that the bottlenecks are in database queries, cache
calls, or external requests. This information enables you to easily compare and
debug fast responses to slow responses.
Elastic APM captures different types of information from within instrumented applications:

//TBD: What are we wanting them to notice in the following screenshot?
//For example, the APM UI shows that the following transaction is spending over 400 ms querying the orders database?
* {apm-overview-ref-v}/transaction-spans.html[*Spans*] contain information about a specific code path that has been executed.
They measure from the start to end of an activity,
and they can have a parent/child relationship with other spans.
* {apm-overview-ref-v}/transactions.html[*Transactions*] are a special kind of span that have extra metadata associated with them.
You can think of transactions as the highest level of work you’re measuring within a service.
As an example, a transaction could be a request to your server, a batch job, or a custom transaction type.
* {apm-overview-ref-v}/errors.html[*Errors*] contain information about the original exception that occurred or about a log created when the exception occurred.

[role="screenshot"]
image::apm/images/apm-transaction.png[Example view of a transaction in the APM UI in Kibana]
Each of these information types have a specific page associated with them in the APM UI.
These various pages display the captured data in curated charts and tables that allow you to easily compare and debug your applications.

For each incoming request and each application error, you can also see
contextual information such as the request header, user information, system
values, or custom data that you manually attached to the request.
For example, you can see information about response times, requests per minute, and status codes per endpoint.
You can even dive into a specific request sample and get a complete waterfall view of what your application is spending its time on.
You might see that your bottlenecks are in database queries, cache calls, or external requests.
For each incoming request and each application error,
you can also see contextual information such as the request header, user information,
system values, or custom data that you manually attached to the request.

Having access to application-level insights with just a few clicks can
drastically decrease the time you spend debugging errors, slow response times,
and crashes.
Having access to application-level insights with just a few clicks can drastically decrease the time you spend debugging errors, slow response times, and crashes.
46 changes: 46 additions & 0 deletions docs/apm/errors.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[[errors]]
=== Errors overview

TIP: {apm-overview-ref-v}/errors.html[Errors] are defined as groups of exceptions with matching exception or log messages.

The *Errors* overview provides a high-level view of the error message and culprit,
the number of occurrences, and the most recent occurrence.
Just like the transaction overview, you'll notice we group together like errors.
This makes it very easy to quickly see which errors are affecting your services,
and to take actions to rectify them.

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

Selecting an error group ID or error message brings you to the *Error group*.

[role="screenshot"]
image::apm/images/apm-error-group.png[Example view of the error group page in the APM UI in Kibana]

Here, you'll see the error message, culprit, and the number of occurrences over time.

Further down, you'll see the Error occurrence table.
This is where you can see the details of a sampled error within this group.
The error shown is always the most recent to occur.

Each error occurrence features a breakdown of the exception, including the stack trace from when the error occurred,
and additional contextual information to help debug the issue.
In some cases, you might also see a Transaction sample ID.
This feature allows you to make a connection between the errors and transactions,
by linking you to the specific transaction where the error occurred.
This allows you to see the whole trace, including which services the request went through.

[float]
[[errors-alerts-with-watcher]]
==== Error reports with Watcher

You can use the power of the alerting features with Watcher to get reports on error occurrences.
The Watcher assistant, which is available on the errors overview, can help you set up a watch per service.

Configure the watch with an occurrences threshold, time interval, and the desired actions, such as email or Slack notifications.
With Watcher, your team can set up reports within minutes.

Watches are managed separately in the dedicated Watcher UI available in Advanced Settings.

[role="screenshot"]
image::apm/images/apm-errors-watcher-assistant.png[Example view of the Watcher assistant for errors in APM UI in Kibana]
25 changes: 12 additions & 13 deletions docs/apm/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@
[[apm-getting-started]]
== Getting Started

If you have not already installed and configured Elastic APM, the
**APM > Getting Started** page in {kib} provides information to help you
complete the setup.
If you have not already installed and configured Elastic APM,
the *Setup Instructions* will get you started.

[role="screenshot"]
image::apm/images/apm-setup.jpg[Installation instructions on the APM page in Kibana]
image::apm/images/apm-setup.png[Installation instructions on the APM page in Kibana]

After you install the Elastic APM agent library in your application, the
application automatically appears in the APM UI in {kib}. No further
configuration is required.
After you install the Elastic APM agent library in your application,
the application automatically appears in the APM UI in {kib}.
No further configuration is required.

If you also use Elastic Stack for logging and server-level metrics, you can
optionally import the APM dashboards that come with the APM Server. You can use
these APM-specific visualizations to correlate APM data with other data sources.
To get the dashboards, click the "Load Kibana objects" button at the bottom of the Getting Started guides for APM in Kibana.
If you also use the Elastic Stack for logging and server-level metrics,
you can import the APM dashboards that come with the APM Server.
You can use these APM specific visualizations to correlate APM data with other data sources.
To get the dashboards, click *Load Kibana objects* at the bottom of the Setup Instructions.

For more setup information, see
{apm-get-started-ref}/index.html[Getting Started with APM].
[role="screenshot"]
image::apm/images/apm-setup-dashboards.png[Install dashboards for APM in Kibana]
Binary file added 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 added 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 added docs/apm/images/apm-services-trace.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-setup-dashboards.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 removed docs/apm/images/apm-setup.jpg
Binary file not shown.
Binary file added docs/apm/images/apm-setup.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-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 removed docs/apm/images/apm-transaction-detail.png
Binary file not shown.
Binary file added docs/apm/images/apm-transaction-duration-dist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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-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-transaction.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-view-full-trace.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/transaction-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions docs/apm/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ The **APM** page in {kib} is provided with the basic license. It
enables developers to drill down into the performance data for their applications
and quickly locate the performance bottlenecks.

For more information about the components of Elastic APM, see
{apm-get-started-ref}/overview.html[APM Overview].
* <<apm-getting-started>>
* <<apm-bottlenecks>>
* <<apm-ui>>

NOTE: For more information about the components of Elastic APM,
see the {apm-get-started-ref}/overview.html[APM Overview].
--

include::getting-started.asciidoc[]

include::bottlenecks.asciidoc[]

include::using-the-apm-ui.asciidoc[]
26 changes: 26 additions & 0 deletions docs/apm/metrics.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[[metrics]]
=== Metrics overview

The *Metrics* overview shows a combination of transaction, error, CPU, and memory data.

If you're experiencing a problem with your service, you can use this page to attempt to find the underlying cause.
For example, you might be able to correlate a high number of errors with a long transaction duration, high CPU usage, or a memory leak.

[role="screenshot"]
image::apm/images/apm-metrics.png[Example view of the Metrics overview in APM UI in Kibana]

[[machine-learning-integration]]
=== Machine Learning integration

The Machine Learning integration will initiate a new job predefined to calculate anomaly scores on transaction response times.
The response time graph will show the expected bounds and annotate the graph when the anomaly score is 75 or above.

[role="screenshot"]
image::apm/images/apm-ml-integration.png[Example view of anomaly scores on response times in APM UI in Kibana]

Jobs can be created per transaction type and based on the average response time.
You can manage jobs in the *Machine Learning jobs management*.
It might take some time for results to appear on the graph.

Machine learning is a platinum feature. For a comparison of the Elastic license levels,
see https://www.elastic.co/subscriptions[the subscription page].
31 changes: 31 additions & 0 deletions docs/apm/query-bar.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[[query-bar]]
=== Advanced queries

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.

When querying, you're simply searching and selecting data from fields in Elasticsearch documents.
It may be helpful to view some of your documents in {kibana-ref}/discover.html[Discover] to better understand how APM data is stored in Elasticsearch.

The query bar is available in the Services, Transactions, Errors, Metrics, and Traces views,
and any input will persist as you move between pages.

TIP: Interactions with the query bar change the URL of the page you're on.
This means you can simply copy and paste the URL of your page to share a specific query or view with others.

In the screenshot below, you can begin to see some of the transaction fields available for filtering on:

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

==== Example queries

* 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`
* View _all_ transactions for an endpoint, instead of just a sample - `processor.event: "transaction" AND transaction.name: "<TRANSACTION_NAME_HERE>"`

TIP: Read the {kibana-ref}/kuery-query.html[Kibana Query Language Enhancements] documentation to learn more about the capabilities of the {kib} query language.
10 changes: 10 additions & 0 deletions docs/apm/services.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[[services]]
=== Services overview

The *Services* overview gives you quick insights into the health and general performance of each service.
The <<set-time-filter,global time range filter>> in {kib} defines which services are available.

You can add services by setting the `service.name` configuration in each of the {apm-agents-ref}[APM agents] you’re instrumenting.

[role="screenshot"]
image::apm/images/apm-services-overview.png[Example view of services table the APM UI in Kibana]
40 changes: 40 additions & 0 deletions docs/apm/spans.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[[spans]]
=== Span timeline

TIP: A {apm-overview-ref-v}/transaction-spans.html[span] is defined as 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.
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 UI 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.
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.

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

If your span timeline is colorful, it's indicative of a <<distributed-tracing,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 UI in Kibana]

Don't forget, 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* in the upper right hand corner of the page.

[role="screenshot"]
image::apm/images/apm-view-full-trace.png[Example of distributed trace colors in the APM UI in Kibana]
Loading

0 comments on commit d01fe5e

Please sign in to comment.