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

A cross-language tracing protocol #39

Open
alpaylan opened this issue Dec 2, 2024 · 2 comments
Open

A cross-language tracing protocol #39

alpaylan opened this issue Dec 2, 2024 · 2 comments

Comments

@alpaylan
Copy link

alpaylan commented Dec 2, 2024

Hi! I had a very similar idea, of which I had already created a prototype when I realized your crate already exists.

https://alperenkeles.com/posts/debuggers-for-free/

The idea is to basically print racket trace compatible traces and create consumers of these traces as a middle ground between visual debuggers and printf debugging.

Do you like this idea? Would you be open to merging this type of printer upstream if I implement it?

@gsingh93
Copy link
Owner

gsingh93 commented Dec 4, 2024

Hi, I wonder if we should extend the format_enter and format_exit (and prefix_enter/prefix_exit) arguments instead of making a printer just for this trace format:

#[trace(format_enter = "{y} and {z} {{7}}", format_exit = "{r} * {r}")]

If we were to make the format customization arguments flexible enough, then others might benefit from it in the future with their own customizations. And you could introduce a wrapper macro (i.e. #[racket_trace]) that wrapped the #[trace] macro with these arguments customized for your trace format.

I think I would be fine merging a PR like that, but my time is very limited and I don't remember how this code works at all so the review might take some time 😅 But if there is a clear example and the tests pass, then I might just merge it with a light review.

@alpaylan
Copy link
Author

alpaylan commented Dec 5, 2024

Hi @gsingh93,

I'll work on extending the format_enter and format_exit, that makes a lot of sense, thanks! I'll ping you with a PR once I've something concrete.

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

No branches or pull requests

2 participants