diff options
author | snek <snek@deno.com> | 2024-11-14 13:16:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-14 12:16:28 +0000 |
commit | 4e899d48cffa95617266dd8f9aef54603a87ad82 (patch) | |
tree | ec667f58ccb4126ecad38bc4600d9dd8dc372ca5 /cli/tools | |
parent | cb107a762fb903973e0d0c2e4481baf2c0bc13b8 (diff) |
fix: otel resiliency (#26857)
Improving the breadth of collected data, and ensuring that the collected
data is more likely to be successfully reported.
- Use `log` crate in more places
- Hook up `log` crate to otel
- Switch to process-wide otel processors
- Handle places that use `process::exit`
Also adds a more robust testing framework, with a deterministic tracing
setting.
Refs: https://github.com/denoland/deno/issues/26852
Diffstat (limited to 'cli/tools')
-rw-r--r-- | cli/tools/lint/mod.rs | 2 | ||||
-rw-r--r-- | cli/tools/test/mod.rs | 2 | ||||
-rw-r--r-- | cli/tools/upgrade.rs | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/cli/tools/lint/mod.rs b/cli/tools/lint/mod.rs index d8edf2404..36f1cc049 100644 --- a/cli/tools/lint/mod.rs +++ b/cli/tools/lint/mod.rs @@ -191,7 +191,7 @@ pub async fn lint( linter.finish() }; if !success { - std::process::exit(1); + deno_runtime::exit(1); } } diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs index fa849614f..966b0d285 100644 --- a/cli/tools/test/mod.rs +++ b/cli/tools/test/mod.rs @@ -1357,6 +1357,7 @@ pub async fn report_tests( if let Err(err) = reporter.flush_report(&elapsed, &tests, &test_steps) { eprint!("Test reporter failed to flush: {}", err) } + #[allow(clippy::disallowed_methods)] std::process::exit(130); } } @@ -1642,6 +1643,7 @@ pub async fn run_tests_with_watch( loop { signal::ctrl_c().await.unwrap(); if !HAS_TEST_RUN_SIGINT_HANDLER.load(Ordering::Relaxed) { + #[allow(clippy::disallowed_methods)] std::process::exit(130); } } diff --git a/cli/tools/upgrade.rs b/cli/tools/upgrade.rs index 77a9f72b8..cb85859f7 100644 --- a/cli/tools/upgrade.rs +++ b/cli/tools/upgrade.rs @@ -540,7 +540,7 @@ pub async fn upgrade( let Some(archive_data) = download_package(&client, download_url).await? else { log::error!("Download could not be found, aborting"); - std::process::exit(1) + deno_runtime::exit(1) }; log::info!( |