This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Description
Scenario: an http server that is instrumented for Zipkin tracing and has a notion of the "current span". If such service makes a downstream call over TChannel, we don't want TChannel to start a new trace/span, but to start the new span as a child of the existing span established by the http server.
I am not sure if today it's possible to do this bridging by passing parent_tracing to each call(), but even if it's possible, it requires manually changing the application at every call site. Instead, it would be much cleaner if the app owner could set a certain "tracing hook" when creating the TChannel, so that this hook would get executed for every request and would retrieve the current parent span from http request context (by whatever means), and return the parent_tracing to the current request (or alternatively set it as the current parent_tracing in TChannel's RequestContext thread-local.