fix: Tracing span names should match function names

When viewing traces, it's slightly confusing when the span name doesn't
match the function name. Ensure the names are consistent.

(It might be worth moving most of these to use #[tracing::instrument]
so the name can never go stale. @davidbarsky suggested that is marginally
slower, so I've just done the simple change here.)
This commit is contained in:
Wilfred Hughes 2024-04-26 17:00:58 -07:00
parent 1bf1f6e0a1
commit c981ff0944
20 changed files with 31 additions and 31 deletions

View file

@ -129,7 +129,7 @@ impl ProcMacroServer {
}
pub fn load_dylib(&self, dylib: MacroDylib) -> Result<Vec<ProcMacro>, ServerError> {
let _p = tracing::span!(tracing::Level::INFO, "ProcMacroClient::load_dylib").entered();
let _p = tracing::span!(tracing::Level::INFO, "ProcMacroServer::load_dylib").entered();
let macros =
self.process.lock().unwrap_or_else(|e| e.into_inner()).find_proc_macros(&dylib.path)?;