tracing: Fix disconnected spans in gitaly-hooks
For #4815 (closed)
gitaly-hooks is a sanitized environment. It does not initialize tracing nor export any tracing spans, even though its process environment variables set includes tracing info. The hook process then triggers RPC call back to Gitaly. Those RPCs are handled, but the corresponding spans are disconnected from the original source. This behavior makes a full flow involving gitaly-hooks broken and scattered all over the place.
This MR fixes this situation by implementing two passthrough gRPC interceptors. They read the tracing info from env and then write into outgoing metadata without modification.
Before
All spans are scattered all over the places. The detail of main operation is not helpful.
After
Relative spans are not well-structured. They are all grouped into the root trace of the full flow.