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

Define custom source location for spans #108

Open
Dinnerbone opened this issue Aug 13, 2024 · 1 comment
Open

Define custom source location for spans #108

Dinnerbone opened this issue Aug 13, 2024 · 1 comment

Comments

@Dinnerbone
Copy link

We have a bunch of code that's generated by another language, and a build script creates the rust bindings for every method defined in the other language. It'd be really nice to be able to generate a span_location!() for each method, pointing to the true original source and line number, rather than it just assuming that file!()/line!() works.

The easiest would probably just be adding those as extra values to the macro, e.g. span_location!(name, function, file, loc), but anything that works at compile time works for us. It'd get generated and stored in a giant pub const FUNCTIONS = .....

@nagisa
Copy link
Owner

nagisa commented Aug 14, 2024

PR welcome.

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