Span are not connected for Spring boot project

426 views
Skip to first unread message

chandresh pancholi

unread,
Jun 12, 2018, 5:05:07 AM6/12/18
to jaeger-...@googlegroups.com
Hi,

I am using Open Tracing/Jaeger with Spring boot. I am using spring-cloud-context library as well.

Scenario: A ---> B

Service A uses open tracing, jaeger-core, spring-cloud-context

In Jaeger UI, the span of service B  comes as "cannot-find-trace-name"

Span comes as connected when I remove spring-cloud-context library. but this library is important for us for configuration management.


--
Chandresh Pancholi
Senior Software Engineer
Flipkart.com
Contact:08951803660

Gary Brown

unread,
Jun 12, 2018, 5:15:51 AM6/12/18
to chandresh pancholi, Jaeger Tracing
Are you using spring-cloud-context with service B? Assuming not, as it is reporting the spans.

Sounds like the spans are being created in service A but not being reported - but the trace context is being passed from service A to service B.

How is the Jaeger tracer being configured in service A and B?




--

--
You received this message because you are subscribed to the Google Groups "Jaeger Tracing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jaeger-tracing+unsubscribe@googlegroups.com.
To post to this group, send email to jaeger-tracing@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jaeger-tracing/CAMzr4XWo-24H4E-VNjPheuEMKhTw6qFUrMXOK1VR4nvZx4uLbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

chandresh pancholi

unread,
Jun 12, 2018, 5:21:43 AM6/12/18
to gbr...@redhat.com, jaeger-...@googlegroups.com
Service A/B OpenTracing Code is same just the service-name changes. Also, I am running both the services on Kubernetes with Istio as service mesh.

import com.ailiens.landlord.config.AppConfig;
import com.uber.jaeger.Configuration;
import com.uber.jaeger.samplers.ProbabilisticSampler;
import com.uber.jaeger.senders.HttpSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class OpenTracing {

@Autowired
private AppConfig appConfig;

@Bean
public io.opentracing.Tracer jaegerTracer() {
HttpSender httpTracer = new HttpSender(appConfig.getJaegerCollector(),0);
return new Configuration("serviceA", new Configuration.SamplerConfiguration(ProbabilisticSampler.TYPE, 1),
new Configuration.ReporterConfiguration(httpTracer))
.getTracer();
}

}

Thanks
Chandresh

On Tue, Jun 12, 2018 at 2:45 PM Gary Brown <gbr...@redhat.com> wrote:
Are you using spring-cloud-context with service B? Assuming not, as it is reporting the spans.

Sounds like the spans are being created in service A but not being reported - but the trace context is being passed from service A to service B.

How is the Jaeger tracer being configured in service A and B?

On Tue, Jun 12, 2018 at 10:04 AM, chandresh pancholi <chandreshp...@gmail.com> wrote:
Hi,

I am using Open Tracing/Jaeger with Spring boot. I am using spring-cloud-context library as well.

Scenario: A ---> B

Service A uses open tracing, jaeger-core, spring-cloud-context

In Jaeger UI, the span of service B  comes as "cannot-find-trace-name"

Span comes as connected when I remove spring-cloud-context library. but this library is important for us for configuration management.


--
Chandresh Pancholi
Senior Software Engineer
Flipkart.com

--
You received this message because you are subscribed to the Google Groups "Jaeger Tracing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jaeger-tracin...@googlegroups.com.
To post to this group, send email to jaeger-...@googlegroups.com.



--
Chandresh Pancholi
Senior Software Engineer
Flipkart.com

Gary Brown

unread,
Jun 12, 2018, 5:48:21 AM6/12/18
to chandresh pancholi, Jaeger Tracing
Does service B use the spring-cloud-context dependency?

Do you get any errors when the tracer is created, when the spring-cloud-context dependency is included?

Is the value returned by appConfig.getJaegerCollector() the same with and without the spring-cloud-context? Might be worth showing the toString() for the Configuration object in both situations (i.e. with and without spring-cloud-context).



--

--
You received this message because you are subscribed to the Google Groups "Jaeger Tracing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jaeger-tracing+unsubscribe@googlegroups.com.
To post to this group, send email to jaeger-tracing@googlegroups.com.



--
Chandresh Pancholi
Senior Software Engineer
Flipkart.com

chandresh pancholi

unread,
Jun 14, 2018, 7:22:58 AM6/14/18
to gbr...@redhat.com, jaeger-...@googlegroups.com
 appConfig.getJaegerCollector() return jaeger-collector endpoint(jaeger-collector.istio-system:14268/api/traces). 
Configuration objects are same with and without spring-cloud-context.





--

--
You received this message because you are subscribed to the Google Groups "Jaeger Tracing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jaeger-tracin...@googlegroups.com.
To post to this group, send email to jaeger-...@googlegroups.com.



--
Chandresh Pancholi
Senior Software Engineer
Flipkart.com


--
Chandresh Pancholi
Senior Software Engineer
Flipkart.com
Reply all
Reply to author
Forward
0 new messages