Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple trace context encodings #2947

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

DrJosh9000
Copy link
Contributor

@DrJosh9000 DrJosh9000 commented Aug 23, 2024

Description

This is part merge-conflict-resolution, part refinement of #1775. The main differences to #1775 are: specifying the encoding with a string flag rather than bool, represented internally with a Codec interface, and some tweaks to the tests.

Context

Closes #1775

  • Add --trace-context-encoding flag and BUILDKITE_TRACE_CONTEXT_ENCODING env var, accepting the values gob and json, defaulting to gob.
  • Parse the new flag/var and plumb the resulting codec through agent start, job runner, and bootstrap.
  • Use the codec to perform encoding/decoding of the trace context.
  • Add tests.

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go fmt ./...)

@DrJosh9000 DrJosh9000 requested a review from a team August 23, 2024 04:12
@DrJosh9000 DrJosh9000 force-pushed the trace-context-encodings branch 2 times, most recently from a7e6504 to fb83f20 Compare August 23, 2024 04:33
@DrJosh9000 DrJosh9000 force-pushed the trace-context-encodings branch 2 times, most recently from 4d03030 to db2ee91 Compare August 26, 2024 05:43
Copy link
Contributor

@wolfeidau wolfeidau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 🚀

This is part merge-conflict-resolution, part refinement of #1775.
The main differences to #1775 are: specifying the encoding with a string flag
rather than bool, represented internally with a `Codec` interface, and some
tweaks to the tests.

Co-authored-by: Sam Park <sam.park@discordapp.com>
@DrJosh9000 DrJosh9000 merged commit e66b047 into main Aug 28, 2024
1 check passed
@DrJosh9000 DrJosh9000 deleted the trace-context-encodings branch August 28, 2024 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants