From c5844ab5893694213dcb3c43ab8bf37c58155690 Mon Sep 17 00:00:00 2001 From: Jack Shirazi Date: Thu, 19 Jan 2023 12:24:18 +0000 Subject: [PATCH 1/2] clarify lack of stack trace in first sample --- docs/method-monitoring.asciidoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/method-monitoring.asciidoc b/docs/method-monitoring.asciidoc index 1ff1f5d0a7..a12f2307c4 100644 --- a/docs/method-monitoring.asciidoc +++ b/docs/method-monitoring.asciidoc @@ -144,6 +144,10 @@ They may start after the method actually started, and end before the method actu This can lead to inconsistencies, all of which are documented in the https://github.com/elastic/apm-agent-java/tree/main/apm-agent-plugins/apm-profiling-plugin[apm-profiling-plugin readme]. +Also note that the very first inferred span in a transaction doesn't have a stack trace as it's +likely to be untypical - it's usually the entry point and has a lot of stuff in it about how the +server has accepted a request etc. Consecutive inferred spans have a stack trace that go to their parent. + // Inferred spans are created after the profiling session ends and therefor may appear later in the APM app's span timeline than regular spans. // Because of this, a regular span cannot be the child of an inferred span. From b8d701d6889babc25eaea8a309b36c9e4e4db30f Mon Sep 17 00:00:00 2001 From: Jack Shirazi Date: Thu, 19 Jan 2023 12:28:27 +0000 Subject: [PATCH 2/2] clarify lack of stack trace in first sample and UI --- docs/method-monitoring.asciidoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/method-monitoring.asciidoc b/docs/method-monitoring.asciidoc index a12f2307c4..98a30f4ac1 100644 --- a/docs/method-monitoring.asciidoc +++ b/docs/method-monitoring.asciidoc @@ -147,6 +147,8 @@ https://github.com/elastic/apm-agent-java/tree/main/apm-agent-plugins/apm-profil Also note that the very first inferred span in a transaction doesn't have a stack trace as it's likely to be untypical - it's usually the entry point and has a lot of stuff in it about how the server has accepted a request etc. Consecutive inferred spans have a stack trace that go to their parent. +This means that long running methods may show as a span from the inferred span mechanism, but not +show an associated stack trace. // Inferred spans are created after the profiling session ends and therefor may appear later in the APM app's span timeline than regular spans. // Because of this, a regular span cannot be the child of an inferred span.