Not able to see the complete trace except the root request

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:

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

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

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

Cheers,
Felix

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.

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. So you might need to reconfigure your JAX-RS client to use one of those.

Yes, see Supported technologies | APM Java Agent Reference [1.x] | Elastic

Cheers,
Felix

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.

See this section about troubleshooting and 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

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.

Here are multiple ways to configure the agent. See the configuration docs 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.

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.

You can use https://gist.github.com/ for instance.

Hi felix,

I have uploaded the agent log to my gist

Thanks
Sattish

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

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

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

You could use the createSpan and injectTraceHeaders APIs to manually create a span for the HTTP call to transfer the trace context in the mean time.

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