2020-04-15 16:54:26 +02:00
|
|
|
[role="xpack"]
|
2019-01-30 18:08:11 +01:00
|
|
|
[[spans]]
|
2020-05-06 00:32:18 +02:00
|
|
|
=== Trace sample timeline
|
2019-01-30 18:08:11 +01:00
|
|
|
|
2020-05-06 00:32:18 +02:00
|
|
|
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.
|
2020-10-20 23:25:42 +02:00
|
|
|
This makes it useful for visualizing where a selected transaction spent most of its time.
|
2019-01-30 18:08:11 +01:00
|
|
|
|
|
|
|
[role="screenshot"]
|
2020-02-11 20:43:03 +01:00
|
|
|
image::apm/images/apm-transaction-sample.png[Example of distributed trace colors in the APM app in Kibana]
|
2019-01-30 18:08:11 +01:00
|
|
|
|
|
|
|
View a span in detail by clicking on it in the timeline waterfall.
|
2020-05-06 00:32:18 +02:00
|
|
|
For example, when you click on an SQL Select database query,
|
2020-03-16 15:58:16 +01:00
|
|
|
the information displayed includes the actual SQL that was executed, how long it took,
|
2019-01-30 18:08:11 +01:00
|
|
|
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.
|
2020-03-16 15:58:16 +01:00
|
|
|
These library frames will be minimized by default in order to show you the most relevant stack trace.
|
2019-01-30 18:08:11 +01:00
|
|
|
|
2020-05-06 00:32:18 +02:00
|
|
|
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.
|
|
|
|
|
2019-01-30 18:08:11 +01:00
|
|
|
[role="screenshot"]
|
2019-11-20 16:36:59 +01:00
|
|
|
image::apm/images/apm-span-detail.png[Example view of a span detail in the APM app in Kibana]
|
2019-01-30 18:08:11 +01:00
|
|
|
|
2020-05-06 00:32:18 +02:00
|
|
|
[float]
|
|
|
|
[[distributed-tracing]]
|
|
|
|
==== Distributed tracing
|
|
|
|
|
|
|
|
If your trace sample timeline is colorful, it's indicative of a distributed trace.
|
2019-01-30 18:08:11 +01:00
|
|
|
Services in a distributed trace are separated by color and listed in the order they occur.
|
|
|
|
|
|
|
|
[role="screenshot"]
|
2019-11-20 16:36:59 +01:00
|
|
|
image::apm/images/apm-services-trace.png[Example of distributed trace colors in the APM app in Kibana]
|
2019-01-30 18:08:11 +01:00
|
|
|
|
2020-05-06 00:32:18 +02:00
|
|
|
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.
|
2020-10-20 23:25:42 +02:00
|
|
|
When viewing distributed traces in the timeline waterfall,
|
|
|
|
you'll see this icon: image:apm/images/transaction-icon.png[APM icon],
|
2019-01-30 18:08:11 +01:00
|
|
|
which indicates the next transaction in the trace.
|
2020-10-20 23:25:42 +02:00
|
|
|
For easier problem isolation, transactions can be collapsed in the waterfall by clicking
|
|
|
|
the icon to the left of the transactions.
|
|
|
|
Transactions can also be expanded and viewed in detail by clicking on them.
|
2019-01-30 18:08:11 +01:00
|
|
|
|
|
|
|
After exploring these traces,
|
2020-04-09 19:42:30 +02:00
|
|
|
you can return to the full trace by clicking *View full trace*.
|
2020-05-06 00:32:18 +02:00
|
|
|
|
|
|
|
TIP: Distributed tracing is supported by all APM agents, and there's no additional configuration needed.
|