openzipkin-contrib / play-zipkin-tracing

Provides distributed tracing for Play Framework and Akka using Zipkin.
Apache License 2.0
48 stars 19 forks source link

TraceWSRequest doubt #33

Closed sachintyagi22 closed 6 years ago

sachintyagi22 commented 6 years ago

Hi, thanks for this. I was going through the code and I have a doubt.

In TraceWSRequest.execute() we start a child span before executing the underlying request. However, the underlying request itself can be a TraceWSRequest.

This can happen if I do:

 val req = traceWSClient.url(spanName, url).withQueryString(params).withHttpHeaders(headers)
req.get()

In above case, it seems there will be multiple child spans (as many as there is nesting of TraceWSRequest) that will be started for a single request. Is this understanding correct? (I haven't yet tested this).

Thanks.

takezoe commented 6 years ago

TraceWSRequest isn't nested. It has just an instance of copied WSRequest. So it never generates multiple child soans in execute().

sachintyagi22 commented 6 years ago

Got it. Thanks.