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

Proc macro attributes for instrumentation? #13

Open
Boscop opened this issue Apr 30, 2021 · 2 comments
Open

Proc macro attributes for instrumentation? #13

Boscop opened this issue Apr 30, 2021 · 2 comments

Comments

@Boscop
Copy link

Boscop commented Apr 30, 2021

Thanks for making this crate.
Is it possible to use proc macro attributes like this with this crate? :)
https://kanejaku.org/posts/2020/10/tracy-profiler-zone-scoped-in-rust/

@aclysma
Copy link

aclysma commented May 1, 2021

There is an implementation of this in the profiling crate (which works with this crate):
https://crates.io/crates/profiling

If there is interest in implementing this in this crate directly, feel free to "steal" this code :D It's pretty small and would allow more customization (like supporting custom scope colors.) The most annoying thing about it is that it requires a separate procmacro-specific crate.
https://github.com/aclysma/profiling/blob/master/profiling-procmacros/src/lib.rs

@nagisa
Copy link
Owner

nagisa commented May 1, 2021

I'm happy to accept contributions, but overall this is handled through the more broadly applicable ecosystem tooling (tracing, profiling, etc.)

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

3 participants