Skip to content

Commit

Permalink
Merge branch '7.x' into ua_batch_reindex_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Sep 27, 2021
2 parents 8cb8b9c + 1ad8524 commit 890d25d
Show file tree
Hide file tree
Showing 280 changed files with 6,537 additions and 1,580 deletions.
9 changes: 8 additions & 1 deletion .buildkite/scripts/steps/storybooks/build_and_upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ const path = require('path');
const STORYBOOKS = [
'apm',
'canvas',
'codeeditor',
'ci_composite',
'url_template_editor',
'codeeditor',
'dashboard',
'dashboard_enhanced',
'data_enhanced',
'embeddable',
'expression_error',
'expression_image',
'expression_metric',
'expression_repeat_image',
'expression_reveal_image',
'expression_shape',
'expression_tagcloud',
'fleet',
'infra',
'security_solution',
Expand Down
492 changes: 432 additions & 60 deletions docs/CHANGELOG.asciidoc

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions docs/apm/dependencies.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[role="xpack"]
[[dependencies]]
=== Dependencies

APM agents collect details about external calls made from instrumented services.
Sometimes, these external calls resolve into a downstream service that's instrumented -- in these cases,
you can utilize <<distributed-tracing,distributed tracing>> to drill down into problematic downstream services.
Other times, though, it's not possible to instrument a downstream dependency --
like with a database or third-party service.
**Dependencies** gives you a window into these uninstrumented, downstream dependencies.

[role="screenshot"]
image::apm/images/dependencies.png[Dependencies view in the APM app in Kibana]

Many application issues are caused by slow or unresponsive downstream dependencies.
And because a single, slow dependency can significantly impact the end-user experience,
it's important to be able to quickly identify these problems and determine the root cause.

Select a dependency to see detailed latency, throughput, and failed transaction rate metrics.

[role="screenshot"]
image::apm/images/dependencies-drilldown.png[Dependencies drilldown view in the APM app in Kibana]

When viewing a dependency, consider your pattern of usage with that dependency.
If your usage pattern _hasn't_ increased or decreased,
but the experience has been negatively effected -- either with an increase in latency or errors,
there's likely a problem with the dependency that needs to be addressed.

If your usage pattern _has_ changed, the dependency view can quickly show you whether
that pattern change exists in all upstream services, or just a subset of your services.
You might then start digging into traces coming from
impacted services to determine why that pattern change has occurred.
14 changes: 8 additions & 6 deletions docs/apm/errors.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@

TIP: {apm-overview-ref-v}/errors.html[Errors] are groups of exceptions with a similar exception or log message.

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,
The *Errors* overview provides a high-level view of the exceptions that APM agents catch,
or that users manually report with APM agent APIs.
Like errors are grouped together to make it easy to quickly see which errors are affecting your services,
and to take actions to rectify them.

A service returning a 5xx code from a request handler, controller, etc., will not create
an exception that an APM agent can catch, and will therefore not show up in this view.

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

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 app in Kibana]
image::apm/images/apm-error-group.png[APM Error group]

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

Expand Down
3 changes: 3 additions & 0 deletions docs/apm/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ start with:

* <<services>>
* <<traces>>
* <<dependencies>>
* <<service-maps>>

Notice something awry? Select a service or trace and dive deeper with:
Expand All @@ -46,6 +47,8 @@ include::services.asciidoc[]

include::traces.asciidoc[]

include::dependencies.asciidoc[]

include::service-maps.asciidoc[]

include::service-overview.asciidoc[]
Expand Down
Binary file modified docs/apm/images/all-instances.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-geo-ui.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-logs-tab.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-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 modified 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.
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 modified 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 added docs/apm/images/dependencies-drilldown.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/dependencies.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/error-rate.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/spans-dependencies.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions docs/apm/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ endif::[]

[partintro]
--
The APM app in {kib} is provided with the basic license.
It allows you to monitor your software services and applications in real-time;
The APM app in {kib} allows you to monitor your software services and applications in real-time;
visualize detailed performance information on your services,
identify and analyze errors,
and monitor host-level and agent-specific metrics like JVM and Go runtime metrics.
Expand Down
35 changes: 22 additions & 13 deletions docs/apm/service-overview.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,34 +69,43 @@ image::apm/images/traffic-transactions.png[Traffic and transactions]

[discrete]
[[service-error-rates]]
=== Error rate and errors
=== Failed transaction rate and errors

The *Error rate* chart displays the average error rates relating to the service, within a specific time range.
An HTTP response code greater than 400 does not necessarily indicate a failed transaction.
<<transaction-error-rate,Learn more>>.
The failed transaction rate represents the percentage of failed transactions from the perspective of the selected service.
It's useful for visualizing unexpected increases, decreases, or irregular patterns in a service's transactions.
+
[TIP]
====
HTTP **transactions** from the HTTP server perspective do not consider a `4xx` status code (client error) as a failure
because the failure was caused by the caller, not the HTTP server. Thus, `event.outcome=success` and there will be no increase in failed transaction rate.
HTTP **spans** from the client perspective however, are considered failures if the HTTP status code is ≥ 400.
These spans will set `event.outcome=failure` and increase the failed transaction rate.
If there is no HTTP status, both transactions and spans are considered successful unless an error is reported.
====

The *Errors* table provides a high-level view of each error message when it first and last occurred,
along with the total number of occurrences. This makes it very easy to quickly see which errors affect
your services and take actions to rectify them. To do so, click *View errors*.

[role="screenshot"]
image::apm/images/error-rate.png[Error rate and errors]
image::apm/images/error-rate.png[failed transaction rate and errors]

[discrete]
[[service-span-duration]]
=== Span types average duration and dependencies

The *Average duration by span type* chart visualizes each span type's average duration and helps you determine
The *Time spent by span type* chart visualizes each span type's average duration and helps you determine
which spans could be slowing down transactions. The "app" label displayed under the
chart indicates that something was happening within the application. This could signal that the
agent does not have auto-instrumentation for whatever was happening during that time or that the time was spent in the
application code and not in database or external requests.

The *Dependencies* table displays a list of downstream services or external connections relevant
to the service at the selected time range. The table displays latency, traffic, error rate, and the impact of
to the service at the selected time range. The table displays latency, throughput, failed transaction rate, and the impact of
each dependency. By default, dependencies are sorted by _Impact_ to show the most used and the slowest dependency.
If there is a particular dependency you are interested in, click *View service map* to view the related
<<service-maps, service map>>.
If there is a particular dependency you are interested in, click *<<dependencies,View dependencies>>* to learn more about it.

NOTE: Displaying dependencies for services instrumented with the Real User Monitoring (RUM) agent
requires an agent version ≥ v5.6.3.
Expand All @@ -106,11 +115,11 @@ image::apm/images/spans-dependencies.png[Span type duration and dependencies]

[discrete]
[[service-instances]]
=== All instances
=== Instances

The *All instances* table displays a list of all the available service instances within the selected time range.
Depending on how the service runs, the instance could be a host or a container. The table displays latency, traffic,
errors, CPU usage, and memory usage for each instance. By default, instances are sorted by _Throughput_.
The *Instances* table displays a list of all the available service instances within the selected time range.
Depending on how the service runs, the instance could be a host or a container. The table displays latency, throughput,
failed transaction, CPU usage, and memory usage for each instance. By default, instances are sorted by _Throughput_.

[role="screenshot"]
image::apm/images/all-instances.png[All instances]
Expand Down
7 changes: 3 additions & 4 deletions docs/apm/set-up.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

APM is available via the navigation sidebar in {Kib}.
If you have not already installed and configured Elastic APM,
the *Setup Instructions* in Kibana will get you started.
the *Add data* page will get you started.

[role="screenshot"]
image::apm/images/apm-setup.png[Installation instructions on the APM page in Kibana]
Expand All @@ -17,10 +17,9 @@ image::apm/images/apm-setup.png[Installation instructions on the APM page in Kib
[[apm-configure-index-pattern]]
=== Load the index pattern

Index patterns tell Kibana which Elasticsearch indices you want to explore.
Index patterns tell {kib} which {es} indices you want to explore.
An APM index pattern is necessary for certain features in the APM app, like the query bar.
To set up the correct index pattern,
simply click *Load Kibana objects* at the bottom of the Setup Instructions.
To set up the correct index pattern, on the *Add data* page, click *Load Kibana objects*.

[role="screenshot"]
image::apm/images/apm-index-pattern.png[Setup index pattern for APM in Kibana]
Expand Down
25 changes: 16 additions & 9 deletions docs/apm/transactions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ APM agents automatically collect performance metrics on HTTP requests, database
[role="screenshot"]
image::apm/images/apm-transactions-overview.png[Example view of transactions table in the APM app in Kibana]

The *Latency*, *transactions per minute*, *Error rate*, and *Average duration by span type*
The *Latency*, *transactions per minute*, *Failed transaction rate*, and *Average duration by span type*
charts display information on all transactions associated with the selected service:

*Latency*::
Expand All @@ -23,17 +23,17 @@ Useful for determining if more responses than usual are being served with a part
Like in the latency graph, you can zoom in on anomalies to further investigate them.

[[transaction-error-rate]]
*Error rate*::
The error rate represents the percentage of failed transactions from the perspective of the selected service.
*Failed transaction rate*::
The failed transaction rate represents the percentage of failed transactions from the perspective of the selected service.
It's useful for visualizing unexpected increases, decreases, or irregular patterns in a service's transactions.
+
[TIP]
====
HTTP **transactions** from the HTTP server perspective do not consider a `4xx` status code (client error) as a failure
because the failure was caused by the caller, not the HTTP server. Thus, there will be no increase in error rate.
because the failure was caused by the caller, not the HTTP server. Thus, `event.outcome=success` and there will be no increase in failed transaction rate.
HTTP **spans** from the client perspective however, are considered failures if the HTTP status code is ≥ 400.
These spans will increase the error rate.
These spans will set `event.outcome=failure` and increase the failed transaction rate.
If there is no HTTP status, both transactions and spans are considered successful unless an error is reported.
====
Expand Down Expand Up @@ -97,7 +97,7 @@ This page is visually similar to the transaction overview, but it shows data fro
the selected transaction group.

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

[[transaction-duration-distribution]]
==== Latency distribution
Expand All @@ -110,10 +110,10 @@ It's the requests on the right, the ones taking longer than average, that we pro
[role="screenshot"]
image::apm/images/apm-transaction-duration-dist.png[Example view of latency distribution graph]

Select a latency duration _bucket_ to display up to ten trace samples.
Click and drag to select a latency duration _bucket_ to display up to 500 trace samples.

[[transaction-trace-sample]]
==== Trace sample
==== Trace samples

Trace samples are based on the _bucket_ selection in the *Latency distribution* chart;
update the samples by selecting a new _bucket_.
Expand Down Expand Up @@ -167,4 +167,11 @@ and solve problems.
[role="screenshot"]
image::apm/images/apm-logs-tab.png[APM logs tab]

// To do: link to log correlation
[[transaction-latency-correlations]]
==== Correlations

Correlations surface attributes of your data that are potentially correlated with high-latency or erroneous transactions.
To learn more, see <<correlations>>.

[role="screenshot"]
image::apm/images/correlations-hover.png[APM lattency correlations]
18 changes: 17 additions & 1 deletion docs/user/dashboard/lens.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -441,4 +441,20 @@ Pagination in a data table is unsupported. To use pagination in data tables, cre
[%collapsible]
====
Specifying the color for a single data point, such as a single bar or line, is unsupported.
====
====

[discrete]
[[is-it-possible-to-inspect-the-elasticsearch-queries-in-Lens]]
.*How do I inspect {es} queries in visualizations?*
[%collapsible]
====
You can inspect the requests sent by the visualization to {es} using the Inspector. It can be accessed within the editor or in the dashboard.
====

[discrete]
[[how-to-isolate-a-single-series-in-a-chart]]
.*How do I isolate a single series in a chart?*
[%collapsible]
====
For area, line, and bar charts, press Shift, then click the series in the legend. All other series are automatically unselected.
====
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@
"@elastic/search-ui-app-search-connector": "^1.6.0",
"@emotion/react": "^11.4.0",
"@hapi/accept": "^5.0.2",
"@hapi/boom": "^9.1.1",
"@hapi/boom": "^9.1.4",
"@hapi/cookie": "^11.0.2",
"@hapi/good-squeeze": "6.0.0",
"@hapi/h2o2": "^9.1.0",
"@hapi/hapi": "^20.0.3",
"@hapi/hoek": "^9.1.1",
"@hapi/inert": "^6.0.3",
"@hapi/podium": "^4.1.1",
"@hapi/hapi": "^20.2.0",
"@hapi/hoek": "^9.2.0",
"@hapi/inert": "^6.0.4",
"@hapi/podium": "^4.1.3",
"@hapi/wreck": "^17.1.0",
"@kbn/ace": "link:bazel-bin/packages/kbn-ace",
"@kbn/alerts": "link:bazel-bin/packages/kbn-alerts",
Expand Down Expand Up @@ -530,11 +530,10 @@
"@types/glob": "^7.1.2",
"@types/gulp": "^4.0.6",
"@types/gulp-zip": "^4.0.1",
"@types/hapi__cookie": "^10.1.1",
"@types/hapi__h2o2": "^8.3.2",
"@types/hapi__hapi": "^20.0.2",
"@types/hapi__inert": "^5.2.2",
"@types/hapi__podium": "^3.4.1",
"@types/hapi__cookie": "^10.1.3",
"@types/hapi__h2o2": "^8.3.3",
"@types/hapi__hapi": "^20.0.9",
"@types/hapi__inert": "^5.2.3",
"@types/has-ansi": "^3.0.0",
"@types/he": "^1.1.1",
"@types/history": "^4.7.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-cli-dev-mode/src/base_path_proxy_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class BasePathProxyServer {
agent: this.httpsAgent,
passThrough: true,
xforward: true,
mapUri: async (request) => {
mapUri: async (request: Request) => {
return {
// Passing in this header to merge it is a workaround until this is fixed:
// https://github.com/hapijs/h2o2/issues/124
Expand Down
3 changes: 2 additions & 1 deletion packages/kbn-legacy-logging/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ RUNTIME_DEPS = [
"//packages/kbn-utils",
"@npm//@elastic/numeral",
"@npm//@hapi/hapi",
"@npm//@hapi/podium",
"@npm//chokidar",
"@npm//lodash",
"@npm//moment-timezone",
Expand All @@ -41,12 +42,12 @@ TYPES_DEPS = [
"//packages/kbn-config-schema",
"//packages/kbn-utils",
"@npm//@elastic/numeral",
"@npm//@hapi/podium",
"@npm//chokidar",
"@npm//query-string",
"@npm//rxjs",
"@npm//tslib",
"@npm//@types/hapi__hapi",
"@npm//@types/hapi__podium",
"@npm//@types/jest",
"@npm//@types/lodash",
"@npm//@types/moment-timezone",
Expand Down
1 change: 0 additions & 1 deletion packages/kbn-legacy-logging/src/legacy_logging_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export class LegacyLoggingServer {
tags: [getLegacyLogLevel(level), ...context.split('.'), ...tags],
timestamp: timestamp.getTime(),
})
// @ts-expect-error @hapi/podium emit is actually an async function
.catch((err) => {
// eslint-disable-next-line no-console
console.error('An unexpected error occurred while writing to the log:', err.stack);
Expand Down
Loading

0 comments on commit 890d25d

Please sign in to comment.