Duration field in span stacktrace

Kibana version: 6.4.0

Elasticsearch version: 6.4.0

APM Server version: 6.7.0

APM Agent language and version: java 1.5

Browser version: Chrome Version 72.0.3626.121

Original install method (e.g. download page, yum, deb, from source, etc.) and version: download page

Fresh install or upgraded from other version? NA

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc. No

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):

I am using java agent 1.5 and added to tomcat start up to collect traces. I am ale to see each transaction in apm-* index. For DB queries, I can see "Duration" for all select queries in span details.

In span details, I want to see "Duration" for each line of code execution along with line number. I can see only line number at the moment in "span.stacktrace"

Example :

Below is from span details page.

"#### Stacktraces"

14 library frames

HttpURLConnection.java in getResponseCode at line 480

HTTPConduit.java in handleResponseInternal at line 1612

HTTPConduit.java in handleResponse at line 1538

HTTPConduit.java in close at line 1445

From View Span Discover

Is there a way to get duration in abs_path along with line number?

"stacktrace": [
{
"exclude_from_grouping": false,
"library_frame": true,
"filename": "HttpURLConnection.java",
"abs_path": "java.net.HttpURLConnection",
"line": {
"number": 480
},
"function": "getResponseCode"
},
{
"library_frame": true,
"exclude_from_grouping": false,
"abs_path": "org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream",
"filename": "HTTPConduit.java",
"line": {
"number": 1612
},
"function": "handleResponseInternal"
},
{
"library_frame": true,
"exclude_from_grouping": false,
"filename": "HTTPConduit.java",
"abs_path": "org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream",
"line": {
"number": 1538
},
"function": "handleResponse"
},

Hi and thanks for your question :slight_smile:

I think what you are looking for is the trace_methods configuration option: https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-trace-methods

Let me know if that works for you.

Thanks,
Felix

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.