spandex-project / spandex

A platform agnostic tracing library
MIT License
333 stars 53 forks source link

Distributed Tracing #36

Closed aspett closed 6 years ago

aspett commented 6 years ago

Adds support for distributed tracing using the x-datadog-trace-id and x-datadog-parent-id as discussed in https://github.com/zachdaniel/spandex/issues/6.

zachdaniel commented 6 years ago

I agree with @asummers. Either one of those changes would suffice for me. I'll merge afterwards , and after I take a closer look once more to confirm everything. It looks straightforward though, should be no issues.

aspett commented 6 years ago

Hmmm. While it might be possible to do that, I don't think it makes sense to not have a parent in this case? What scenario are you imagining where there might not be a parent span?

zachdaniel commented 6 years ago

I think with datadog you always have a top level span, but with other tracing implementations that isn't required. Let's not worry about it for now, and if someone wants it they can add it/ ask for it.

aspett commented 6 years ago

Oh gotcha. I think this would work as-is. I've reversed the conditional for now, but agree it may be a little difficult to get this perfect without another adapter going. Thanks for looking over this

coveralls commented 6 years ago

Coverage Status

Coverage increased (+3.1%) to 62.534% when pulling 49d4f0b439a1a8ac02b331ea17dd710c1c1e7991 on aspett:feature/distributed_tracing into 026ad82bfb49fce195ebf68c04f4dcfe78dc2c1c on zachdaniel:master.

zachdaniel commented 6 years ago

Released and available on hex as 1.3.4