I see opentracing code in java apm agent. How do I enable it and see spans and transactions in APM?
Hi, the documentation tells you how to get started with OT and Elastic APM. Is there anything you are missing in the docs?
Sorry but I forgot to mention.... The APM jar is loaded as a java agent when I start my springboot application. So do I need to load it via gradle?
And do I have to initialise the tracer in every controller or is there a common location?
Could you tell me a bit more about your use case? What do you want to use the OpenTracing API for? Do you still want the auto instrumentation from the Elastic agent?
You need to use the javaagent and add a dependency to the
You can use the
opentracing-util to globally register your tracer.
I am already using JAVA APM Agent snapshot(0.7.0) to track my java agents. Right now only SQL queries are being traced behind every transaction. I wanted to know if the internal API calls also can be traced
Which technologies are you using for the internal API calls? Are these external calls, which go over the network? If yes, which protocol are you using? Or do you want to trace internal method calls of certain methods?
You can also use the public API of the agent, which might be a bit easier to use than the OT API.
We are using
Java : 1.8
We have around 20 microservices which call each other and also call external URLs. I had tried spring sleuth and zipkin. It was pretty straightforward and didn't involve any change in code.
I wanted to know if APM agent worked like that so I dont have to depend on sleuth for tracing
@felixbarny any suggestions?
Sounds like you need distributed tracing. We are currently working on implementing this and it will be the next big feature we are releasing. In the meantime, you can use the java agent to trace each service individually. As soon as we support distributed tracing, you won't have to change anything apart from updating to the new version. To get a glance at how it might look like, see this issue.
BTW, which library are you using to make calls to your services? SpringRestTemplate?
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.