tabdulradi / puretracing

opentracing for pure applications
Apache License 2.0
17 stars 6 forks source link

Support headers injection/extraction as Map[String, String] #2

Closed tabdulradi closed 5 years ago

tabdulradi commented 5 years ago

First stab at supporting span propagation across boundaries. This commit provides the necessary functionality in order to instrument http servers and/or clients.

Under examples there is a dummy http client implementation that just logs to console. screenshot 2018-12-24 at 21 57 28 The image above shows 3 http requests, first 2 are sent from the same span, so they have identical headers. But the third is sent from a child span, so it has a slightly different headers, but still sharing the same trace id (the first segment of the uber-trace-id).

Note the key uber-trace-id is just the default value provided by JaegerTracer, which is configurable of course, and also depends on which io.opentracing.Tracer implementation the user choose to provide.

gvolpe commented 5 years ago

Looks good to me :+1: