Skip to content

Commit 6a482ac

Browse files
[apm] Clarify how data is populated in the APM Infrastructure tab (#4692)
* first draft * remove code comments * remove code comment
1 parent 7ed8d72 commit 6a482ac

File tree

2 files changed

+45
-3
lines changed

2 files changed

+45
-3
lines changed

docs/en/observability/apm/troubleshooting/common-problems.asciidoc

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This section describes common problems you might encounter when using APM Server
1717
* <<troubleshooting-unknown-route>>
1818
* <<troubleshooting-fields-unsearchable>>
1919
* <<service-map-rum-connections>>
20+
* <<troubleshooting-apm-infra-data>>
2021

2122
[float]
2223
[[apm-no-data-indexed]]
@@ -282,10 +283,35 @@ If the service map is not showing an expected connection between the client and
282283
it's likely because you haven't configured
283284
{apm-rum-ref}/distributed-tracing-guide.html[`distributedTracingOrigins`].
284285

285-
286286
This setting is necessary, for example, for cross-origin requests.
287287
If you have a basic web application that provides data via an API on `localhost:4000`,
288288
and serves HTML from `localhost:4001`, you'd need to set `distributedTracingOrigins: ['https://localhost:4000']`
289289
to ensure the origin is monitored as a part of distributed tracing.
290290
In other words, `distributedTracingOrigins` is consulted prior to the APM agent adding the
291291
distributed tracing `traceparent` header to each request.
292+
293+
[float]
294+
[[troubleshooting-apm-infra-data]]
295+
== No data shown in the infrastructure tab
296+
297+
If you don't see any data in the *Infrastructure* tab for a selected service in the Applications UI,
298+
there are a few possible causes and solutions.
299+
300+
*If you also do _not_ see the data in the* <<view-infrastructure-metrics,*Infrastructure inventory*>>
301+
302+
Refer to the <<troubleshooting-infrastructure-monitoring,Infrastructure troubleshooting docs>>.
303+
304+
*If you _do_ see the data in the* <<view-infrastructure-metrics,*Infrastructure inventory*>>
305+
306+
// Why this happens
307+
It's likely that there is a problem correlating APM and infrastructure data. The `host.hostname`
308+
field value in the APM data and the `host.name` field value in infrastructure data are used to
309+
correlate data, and the queries used to correlate the data are case sensitive.
310+
311+
// Potential fix
312+
To fix this, make sure these two fields match exactly.
313+
314+
For example, if the APM agent is not configured to use the correct host name,
315+
the host name might be set to the container name or the Kubernetes pod name.
316+
To get the correct host name, you need to set some additional configuration options,
317+
specifically `system.kubernetes.node.name` as described in <<apm-api-kubernetes-data>>.

docs/en/observability/apm/view-and-analyze/drill-down/infrastructure.asciidoc

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,27 @@
44
beta::[]
55

66
The *Infrastructure* tab provides information about the containers, pods, and hosts
7-
that the selected service is linked to.
7+
that the selected service is linked to:
8+
9+
* *Pods*: Uses the `kubernetes.pod.name` from the <<apm-data-model-metrics,APM metrics data streams>>.
10+
* *Containers*: Uses the `container.id` from the <<apm-data-model-metrics,APM metrics data streams>>.
11+
* *Hosts*: If the application is containerized--if the APM metrics documents include `container.id`--
12+
the `host.name` is used from the infrastructure data streams (filtered by `container.id`).
13+
If not, `host.hostname` is used from the APM metrics data streams.
814

915
[role="screenshot"]
1016
image::./images/infra.png[Example view of the Infrastructure tab in Applications UI in Kibana]
1117

1218
IT ops and software reliability engineers (SREs) can use this tab
1319
to quickly find a service's underlying infrastructure resources when debugging a problem.
14-
Knowing what infrastructure is related to a service allows you to remediate issues by restarting, killing hanging instances, changing configuration, rolling back deployments, scaling up, scaling out, and so on.
20+
Knowing what infrastructure is related to a service allows you to remediate issues by restarting, killing hanging instances, changing configuration, rolling back deployments, scaling up, scaling out, and so on.
21+
22+
// Link to troubleshooting so we can keep
23+
// troubleshooting content centralized
24+
[TIP]
25+
.Why is the infrastructure tab empty?
26+
====
27+
If there is no data in the Application UI's infrastructure tab for a selected service,
28+
you can read more about why this happens and how to fix it in the
29+
<<troubleshooting-apm-infra-data,troubleshooting docs>>.
30+
====

0 commit comments

Comments
 (0)