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

CP-52744: Thread TraceContext as JSON inside debug_info #6230

Open
wants to merge 2 commits into
base: feature/perf
Choose a base branch
from

Conversation

GabrielBuica
Copy link
Contributor

Adds functionality to marshal and unmarshal TraceContext in the tracing library.
Instead of passing only the traceparent in debug_info, the entire TraceContext is now passed as JSON.

This change enables the transfer of baggage across xenopsd boundaries, improving tracing propagation and debugging capabilities. This should also enable later use of baggage as means of passing the thread classification between components.

Adds functionality to marshal and unmarshal `TraceContext` in the tracing
library.
Instead of passing only the `traceparent` in `debug_info`, the entire
`TraceContext` is now passed as JSON.

This change enables the transfer of baggage across xenopsd boundaries,
improving tracing propagation and debugging capabilities. This should
also enable later use of `baggage` as means of passing the thread
classification between components.

Signed-off-by: Gabriel Buica <[email protected]>
@GabrielBuica GabrielBuica force-pushed the private/dbuica/tracecontext-in-debuginfo branch from 9bc7086 to 39d5dfc Compare January 15, 2025 10:01

type baggage = (string * string) list
type baggage = (string * string) list [@@deriving yojson]
Copy link
Contributor

@edwintorok edwintorok Jan 15, 2025

Choose a reason for hiding this comment

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

we usually use rpcty for deriving (and then we can transform that into json with Rpcmarshal)
(and we can then also choose a more efficient serialization format in the future, I think when I last tested 'csexp' was faster than json)

Copy link
Contributor Author

@GabrielBuica GabrielBuica Jan 16, 2025

Choose a reason for hiding this comment

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

Here ff91579.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure that I agree with @edwintorok here; this is clearly unrelated to RPC, so I think deriving JSON is fine. However, I am not sure what happens here - what JSON are we expecting here and what is the relation with (string * string) list (a key-value list, I assume).

@GabrielBuica GabrielBuica force-pushed the private/dbuica/tracecontext-in-debuginfo branch from 5aec6e6 to ff91579 Compare January 16, 2025 09:55
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.

3 participants