agent
agent copied to clipboard
Use base64+json for trace context encoding
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
I'm excited about this PR - it would help us send additional traces through to Datadog!
This has been sitting around for months. Any chance someone from Buildkite can review this?
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.