Skip to content

Support distributed tracing in child processes

Andrew Newdigate requested to merge an-spawn-span-propagation into master

Depends on labkit!10 (merged)

Adds support for propagating spans across spawned processes.

For example, this is a partial view of an inter-gitaly call that occurs (via gitaly-ssh) during a repository fork:

image

Initial iteration will support Gitaly Go to Go child processes but Ruby support will arrive following the release of labkit-ruby.

govendor fetch -v gitlab.com/gitlab-org/labkit/...@=an-labkit-env

Reviewers Guide

Propagating the configuration

LabKit uses the GITLAB_TRACING environment variable to configure a process for distributed tracing.

This change injects the GITLAB_TRACING environment variable into the child gitaly-ssh and Gitaly-Ruby processes so that they can configure themselves for tracing.

Propagating the span

Additionally, if an existing span is active, the TraceID and SpanID will be propagated via environment variables.

In the child process, these will be used to create a child span

Edited by GitLab Release Tools Bot

Merge request reports