siso: forward the caller's trace context through the proxy

The proxy forwarded only the REAPI RequestMetadata upstream, so a build
running through `siso proxy` lost its trace context: siso's client
writes grpc-trace-bin, the proxy dropped it, and RBE saw the RPC with no
parent span. The server-side spans were orphaned instead of nesting
under the step that issued the RPC, which is what the same build gets
when it talks to RBE directly.

Forward grpc-trace-bin alongside the RequestMetadata. Each upstream call
belongs to exactly one incoming RPC, so forwarding the caller's value
does not combine trace contexts.

This relies on the proxy not setting Option.TracerProvider. If it did,
its own client would write grpc-trace-bin via the tracing dial option
and the forwarded value would be a duplicate.

Change-Id: I3aedd2c0759a0021aa473cb8a295d03d92712070
Reviewed-on: https://chromium-review.googlesource.com/c/build/+/8130017
Reviewed-by: Yuke Liao <liaoyuke@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Philipp Wollermann <philwo@google.com>
2 files changed
tree: 6c32d9c9a1cac6c6bef55b93f9e508f3f7511ba0
  1. bench/
  2. gong/
  3. hashigo/
  4. infra/
  5. kajiya/
  6. kzipinfo/
  7. remote-apis/
  8. runmc/
  9. siso/
  10. .gitignore
  11. .golangci.yml
  12. .style.yapf
  13. BUILD_OWNERS
  14. BUILD_TEAM_OWNERS
  15. CONTRIBUTING.md
  16. LICENSE
  17. OWNERS
  18. PRESUBMIT.py
  19. README.md
  20. WATCHLISTS
README.md

build.git repository

This repository contains tools developed and owned by the Chrome Build Team.

Quick start

The steps for getting the code are:

  1. Install depot_tools
  2. Run git clone https://chromium.googlesource.com/build

We use the standard Go module workflow to work on our projects.

Links