Introduces tracing crate to improve the edge runtime debugging experience.
In this PR, I'm not trying to apply tracing to all of the codebase, just the sb_module_loader crate. (There's nothing special about this 😅)
Changes
cli: Changed the behavior of the -v--verbose cli flag in cli/tracing feature flag
When this feature flag is enabled and -v or --verbose flag is set, detailed tracing span events are output to the console.
With -v or --verbose flag
...
2024-06-24T03:07:11.447652Z DEBUG ThreadId(04) load{specifier="https://deno.land/std/http/status.ts"}: sb_module_loader::standalone::standalone_module_loader: new
2024-06-24T03:07:11.447670Z DEBUG ThreadId(04) load{specifier="https://deno.land/std/http/status.ts"}: sb_module_loader::standalone::standalone_module_loader: enter
2024-06-24T03:07:11.447727Z DEBUG ThreadId(04) load{specifier="https://deno.land/std/http/status.ts"}: sb_module_loader::standalone::standalone_module_loader: exit
2024-06-24T03:07:11.447744Z DEBUG ThreadId(04) load{specifier="https://deno.land/std/http/status.ts"}: sb_module_loader::standalone::standalone_module_loader: close time.busy=57.0µs time.idle=35.7µs
...
What kind of change does this PR introduce?
Enhancement
Description
Introduces
tracing
crate to improve the edge runtime debugging experience.In this PR, I'm not trying to apply tracing to all of the codebase, just the
sb_module_loader
crate. (There's nothing special about this 😅)Changes
cli: Changed the behavior of the
-v
--verbose
cli flag incli/tracing
feature flag When this feature flag is enabled and-v
or--verbose
flag is set, detailed tracing span events are output to the console.With
-v
or--verbose
flag