agent icon indicating copy to clipboard operation
agent copied to clipboard

Use base64+json for trace context encoding

Open goodspark opened this issue 1 year ago • 3 comments

Back when I added trace propagation to the agent, I was short-sighted and used the golang-binary format. Since the trace context was meant to be propagated between builds of a pipeline, it was safe to assume the consumers would always be able to decode golang-binary formats.

But now I want to trace additional spans within non-Golang code and link it to the parent trace of the pipeline build. This will let me gather hollistic metrics about specific failure modes and performance of various commands/tooling running in my repos.

So I picked JSON, since it's a format all modern languages can easily parse without the need for a special library.

TODOs

  • [x] Tests
  • [x] Test a build and verify traces go through and trace context is properly passed to subprocesses

goodspark avatar Oct 04 '22 00:10 goodspark

I'm excited about this PR - it would help us send additional traces through to Datadog!

agates4 avatar Nov 07 '22 15:11 agates4

This has been sitting around for months. Any chance someone from Buildkite can review this?

goodspark avatar Feb 10 '23 17:02 goodspark

Hey folks, is there anything we could do to merge this PR? This would be really useful to add custom trace spans in our commands running in CI.

smocherla-brex avatar Jun 05 '24 13:06 smocherla-brex