pub struct TelemetrySpan { /* private fields */ }Expand description
In-memory telemetry span that writes line-delimited JSON events when enabled.
Implementations§
Source§impl TelemetrySpan
impl TelemetrySpan
Sourcepub fn start(runtime: &str, argv: &[String]) -> Self
pub fn start(runtime: &str, argv: &[String]) -> Self
Start a telemetry span for one CLI invocation.
Sourcepub fn finish_exit(
&self,
exit_code: i32,
stdout_bytes: usize,
stderr_bytes: usize,
)
pub fn finish_exit( &self, exit_code: i32, stdout_bytes: usize, stderr_bytes: usize, )
Record invocation completion based on final process exit.
Sourcepub fn finish_internal_error(&self, error_message: &str, exit_code: i32)
pub fn finish_internal_error(&self, error_message: &str, exit_code: i32)
Record invocation failure caused by internal runtime errors.
Trait Implementations§
Source§impl Clone for TelemetrySpan
impl Clone for TelemetrySpan
Source§fn clone(&self) -> TelemetrySpan
fn clone(&self) -> TelemetrySpan
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TelemetrySpan
impl RefUnwindSafe for TelemetrySpan
impl Send for TelemetrySpan
impl Sync for TelemetrySpan
impl Unpin for TelemetrySpan
impl UnsafeUnpin for TelemetrySpan
impl UnwindSafe for TelemetrySpan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more