# Not able to see the complete trace except the root request

**URL:** <https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160>\
**Category:** APM\
**Created:** [January 14, 2019, 2:58pm UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160 "2019-01-14T14:58:44Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![sattishv](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sattishv](https://discuss.elastic.co/u/sattishv)\
**Post date:** [January 14, 2019, 2:58pm UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/1 "2019-01-14T14:58:44Z")

</div>

Hi team,

We were able to configure the agent and the server by modifying the localhost to 0.0.0.0 in config files since we use remote apm-server. After configuration we could see only the root method not the complete trace we couldn't drill down further from the root transaction. Do we need to add add the packages list. Have attached the screenshot

JAVA options used:

 ![40%20PM](https://us1.discourse-cdn.com/elastic/original/3X/6/1/611a086ea77fa147d8c3097e7131edce53883a40.png) rapper.java.additional.46=-javaagent:/opt/elastic-apm-agent-1.2.0.jar  
wrapper.java.additional.47=-Delastic.apm.service\_name=DemoAPP  
wrapper.java.additional.48=-Delastic.apm.server\_url=http://10.239.39.83:8200

Thanks  
Sattish

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [January 14, 2019, 6:57pm UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/2 "2019-01-14T18:57:40Z")

</div>

Hi and thanks for trying out the Java agent!

Our agents don't trace all the methods of your application by default. By default we mostly capture external calls. See a full list of supported technologies here: [https://www.elastic.co/guide/en/apm/agent/java/current/supported-technologies-details.html](https://www.elastic.co/guide/en/apm/agent/java/current/supported-technologies-details.html)

But with 1.3.0, you can configure which methods of your application should be traced: [https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-trace-methods](https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-trace-methods)

Cheers,  
Felix

---

<div class="post-metadata">

**Author:** ![sattishv](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sattishv](https://discuss.elastic.co/u/sattishv)\
**Post date:** [January 16, 2019, 5:31pm UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/3 "2019-01-16T17:31:30Z")

</div>

Hi Felix,

Thanks for the response. Have few queries based on your inputs. Our platform uses Microservices predominantly using REST style with JAX-RS. I see those been supported in your list.But still i couldn't see the complete trace. Not sure what am i missing in my configuration.

Does elastic apm support openjdk 1.8 versions

Thanks  
Sattish.

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [January 16, 2019, 6:59pm UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/4 "2019-01-16T18:59:43Z")

</div>

> [@sattishv](#):
>
> But still i couldn't see the complete trace

What exactly is it you are missing? Is the transaction recorded? Does it have the correct name? Which HTTP client are you using to call the other services? Are those calls collected?

Note that the Java agent currently supports these HTTP clients: [Supported technologies | APM Java Agent Reference [1.x] | Elastic](https://www.elastic.co/guide/en/apm/agent/java/current/supported-technologies-details.html#supported-networking-frameworks). So you might need to reconfigure your JAX-RS client to use one of those.

> [@sattishv](#):
>
> Does elastic apm support openjdk 1.8 versions

Yes, see [Supported technologies | APM Java Agent Reference [1.x] | Elastic](https://www.elastic.co/guide/en/apm/agent/java/current/supported-technologies-details.html#supported-java-versions)

Cheers,  
Felix

---

<div class="post-metadata">

**Author:** ![sattishv](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sattishv](https://discuss.elastic.co/u/sattishv)\
**Post date:** [January 18, 2019, 11:55am UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/5 "2019-01-18T11:55:54Z")

</div>

Hi Felix,

Verified the agent supported technologies. We are using the right Apache Http client 4.5.6. JAX\_RS specification and Resteasy as implementation of JAX-RS classes. Still i am not able to trace. Can you let us where the agent logs are stored.

Sattish.

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [January 18, 2019, 12:32pm UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/6 "2019-01-18T12:32:08Z")

</div>

See this section about troubleshooting and logging: [https://www.elastic.co/guide/en/apm/agent/java/current/trouble-shooting.html#trouble-shooting-logging](https://www.elastic.co/guide/en/apm/agent/java/current/trouble-shooting.html#trouble-shooting-logging)

Could you attach your debug logs of starting up the application and executing an jax-rs http request once?

Thanks,  
Felix

---

<div class="post-metadata">

**Author:** ![sattishv](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sattishv](https://discuss.elastic.co/u/sattishv)\
**Post date:** [January 19, 2019, 6:52am UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/7 "2019-01-19T06:52:23Z")

</div>

Hi Felix,

Thanks. It looks like i haven't set the agent configuration file . My agent home has only agent.jar . I believe thats the reason i couldn't the agent logs separately. Do we need to explicitly create the agent configuration file at location where the agent jar resides. Could you please confirm.

Sattish.

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [January 19, 2019, 8:53am UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/8 "2019-01-19T08:53:24Z")

</div>

Here are multiple ways to configure the agent. See the [configuration docs](https://www.elastic.co/guide/en/apm/agent/java/current/configuration.html) for details.

> Do we need to explicitly create the agent configuration file at location where the agent jar resides.

Yes, this is one option of configuring the agent.

---

<div class="post-metadata">

**Author:** ![sattishv](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sattishv](https://discuss.elastic.co/u/sattishv)\
**Post date:** [January 19, 2019, 9:18am UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/9 "2019-01-19T09:18:49Z")

</div>

Hi Felix,

I could generate the agent logs by configuring the log\_level to TRACE but not able to attach since upload option allows only image files but mine has a extn .log. Let me know the other ways

Sattish.

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [January 19, 2019, 9:30am UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/10 "2019-01-19T09:30:08Z")

</div>

You can use [https://gist.github.com/](https://gist.github.com/) for instance.

---

<div class="post-metadata">

**Author:** ![sattishv](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sattishv](https://discuss.elastic.co/u/sattishv)\
**Post date:** [January 19, 2019, 2:59pm UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/11 "2019-01-19T14:59:14Z")

</div>

Hi felix,

I have uploaded the agent log to my gist

> <https://gist.github.com/sattishv/94c118749033711a14b37b7d208395b0>

Thanks  
Sattish

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [January 19, 2019, 5:39pm UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/12 "2019-01-19T17:39:29Z")

</div>

Thanks for providing the logs.

I could see that the Apache HTTP client does get successfully instrumented. But I don't see a span created for outgoing HTTP requests. The reason for might be that your JAX-RS client does not use the Apache HTTP client. Note that the agent does not support Apache's async client yet. Could you confirm which HTTP client is actually used? Preferably by stepping through the code with a debugger.

Thanks,  
Felix

---

<div class="post-metadata">

**Author:** ![sattishv](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sattishv](https://discuss.elastic.co/u/sattishv)\
**Post date:** [January 22, 2019, 9:40am UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/13 "2019-01-22T09:40:11Z")

</div>

Hi Felix,

Had a conversation with my Dev team. They confirmed that JAX-RS uses apache http client 4.5.6 for sync and for async they use RxNetty

Thanks  
Sattish

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [January 22, 2019, 11:00am UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/14 "2019-01-22T11:00:41Z")

</div>

Hi Sattish,

So maybe there is an async call in this case?  
That would explain why there is no span for it. RxNetty is currently not supported.

Thanks,  
Felix

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [January 22, 2019, 11:03am UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/15 "2019-01-22T11:03:48Z")

</div>

You could use the [`createSpan`](https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html#api-span-start-span) and [`injectTraceHeaders`](https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html#api-transaction-inject-trace-headers) APIs to manually create a span for the HTTP call to transfer the trace context in the mean time.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 12, 2019, 7:03am UTC](https://discuss.elastic.co/t/not-able-to-see-the-complete-trace-except-the-root-request/164160/16 "2019-02-12T07:03:50Z")

</div>

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