snark icon indicating copy to clipboard operation
snark copied to clipboard

Allow `ns` to have run-time defined namespaces

Open ValarDragon opened this issue 3 years ago • 1 comments

Summary

Namespace names at the moment must be &'static str. There are use cases in which you would want runtime defined namespaces, e.g. for generating many circuits of different sizes, or prefixing what step of a computation you are in.

I think we should try to generalize this to &str. I'm not really clear why its limited to &'static str at the moment, is this imposed by tokio-rs/tracing's info_span! macro?


For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

ValarDragon avatar Jan 05 '21 14:01 ValarDragon

Yes, the limitation is due to tracing. There might be a way to work around it though

Pratyush avatar Jan 05 '21 15:01 Pratyush