Skip to content

Instrument batch commands for tracing

Igor requested to merge tracing-instrument-batch into master

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:

image

refs https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/11679

cc @mwasilewski-gitlab

Edited by Igor

Merge request reports