summaryrefslogtreecommitdiff
path: root/ext/napi/node_api.rs
diff options
context:
space:
mode:
authorsnek <snek@deno.com>2024-11-14 13:16:28 +0100
committerGitHub <noreply@github.com>2024-11-14 12:16:28 +0000
commit4e899d48cffa95617266dd8f9aef54603a87ad82 (patch)
treeec667f58ccb4126ecad38bc4600d9dd8dc372ca5 /ext/napi/node_api.rs
parentcb107a762fb903973e0d0c2e4481baf2c0bc13b8 (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 'ext/napi/node_api.rs')
-rw-r--r--ext/napi/node_api.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/napi/node_api.rs b/ext/napi/node_api.rs
index 186ae42c4..2ca5c8d0b 100644
--- a/ext/napi/node_api.rs
+++ b/ext/napi/node_api.rs
@@ -140,7 +140,6 @@ fn napi_fatal_exception(env: &mut Env, err: napi_value) -> napi_status {
}
#[napi_sym]
-#[allow(clippy::print_stderr)]
fn napi_fatal_error(
location: *const c_char,
location_len: usize,
@@ -173,9 +172,9 @@ fn napi_fatal_error(
};
if let Some(location) = location {
- eprintln!("NODE API FATAL ERROR: {} {}", location, message);
+ log::error!("NODE API FATAL ERROR: {} {}", location, message);
} else {
- eprintln!("NODE API FATAL ERROR: {}", message);
+ log::error!("NODE API FATAL ERROR: {}", message);
}
std::process::abort();