Instrument batch commands for tracing
This is quite a chunky MR. Apologies in advance.
In the context of gitlab-com/gl-infra&210 (closed), we're introducing distributed tracing in the form of jaeger.
One of the bits that would be nice to have in the trace is when gitaly shells out to git (!2685 (merged)). The trickier bit is the catfile batching which relies on a pool of long-running cat-file processes.
We instrument the functions that communicate with those batch processes separately. Unfortunately that required implementing quite a bit of context propagation, but I think it's worth it.
We add explicit instrumentation to the following functions:
Batch.Info
Batch.Tree
Batch.Commit
Batch.Blob
Batch.Tag
See:
refs https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/11679
Edited by Igor