How to use distributed tracing

hi , how to use distributed tracing without change the code in different classname?

Kibana version:7.0.0

Elasticsearch version:7.0.0

APM Server version:7.2.0

APM Agent language and version: java 1.7.0

i just got the transactions like this

Distributed tracing is supported out of the box for supported technologies.
Which of the supported technologies and frameworks listed in our documentation do you use in client and server sides?

springboot,i want to connect different transactions as one.
will u explain how distributed tracing works?
what i should must configured?

For HTTP, distributed tracing works by injecting a header on the client side and reading it on the server side. This means the basic requirement is that you have an agent installed on both sides of the communication.

If you are using supported stuff, it should work automatically without requiring any configuration.

Is your HTTP client listed among our supported clients? If so, and you don't get that working, we need to see why, so you will need to provide more info, like agent logs where log_level is set to DEBUG or TRACE.

If you are not using supported technologies, you can use our Public API. Look for similar topics in the forum, like this one.

Good luck.

emmmmm
@Eyal_Koren
this is my problem:
program A use class SendOrderToQueueTask to send message to MQ,program B use class DsReceiverJob to get the message from MQ.
now apm can trace DsReceiverJob automatically ,but i cant trace SendOrderToQueueTask.
in the debug log,it show SendOrderToQueueTask is configured.

Blockquote
2019-08-23 10:16:15.720 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - service_name: 'rafs-test' (source: Java System Properties)
2019-08-23 10:16:15.721 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - global_labels: 'tagone= apmdis' (source: Java System Properties)
2019-08-23 10:16:15.721 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - trace_methods: 'c.c.b.etlif.ds.SendOrderToQueueTask*' (source: Java System Properties)
2019-08-23 10:16:15.721 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - server_urls: 'http://10.3.134.51:8200' (source: Java System Properties)
2019-08-23 10:16:15.721 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - application_packages: 'org.example,org.another.example' (source: Java System Properties)
2019-08-23 10:16:15.721 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - log_level: 'DEBUG' (source: Java System Properties)
2019-08-23 10:16:15.721 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - log_file: '/weblogic/processor/processor-8551/logs/apm.log' (source: Java System Properties)

but there is no more information about SendOrderToQueueTask in apmlog.(in the program log,it show SendOrderToQueueTask is working )

i asked the program developer,they used springboot1.3.6 in whole system.

and how to gather SendOrderToQueueTask and DsReceiverJob in one transaction?

should i use Public API to fix my problem? thks

Right, using the trace_methods will not give you anything other than a span.

If you are using JMS, note that agent 1.7.0 already supports that, but it is still an experimental feature, so it is disabled by default and you need to activate it. See more details in our documentation.
If this is indeed JMS, you will get distributed tracing but not sure whether your receiver side logic will be properly correlated to the sender logic. Try it out and share the results and your sender and receiver code, as we are now working on improving the correlation, so it can be useful. A debug log of both sender and receiver would be useful as well.

If you are not using JMS, then you should probably use the APIs.

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