pub struct TelemetryRuntime { /* private fields */ }Expand description
Cloneable explicit GraphForge telemetry provider handle.
Implementations§
Source§impl TelemetryRuntime
impl TelemetryRuntime
Sourcepub fn new(config: TelemetryConfig) -> Result<Self, TelemetryConfigError>
pub fn new(config: TelemetryConfig) -> Result<Self, TelemetryConfigError>
Construct one explicit provider. No global state is read or changed.
Sourcepub const fn is_enabled(&self) -> bool
pub const fn is_enabled(&self) -> bool
Whether this handle owns an enabled provider.
Sourcepub fn record(&self, signal: Signal, attributes: Attributes) -> RecordStatus
pub fn record(&self, signal: Signal, attributes: Attributes) -> RecordStatus
Record one registered signal without blocking or surfacing exporter failure.
Sourcepub fn record_job(
&self,
job: JobSnapshot,
) -> Result<RecordStatus, InvalidJobSnapshot>
pub fn record_job( &self, job: JobSnapshot, ) -> Result<RecordStatus, InvalidJobSnapshot>
Record one validated local workspace-job trace without blocking the job.
Sourcepub fn force_flush(&self) -> LifecycleStatus
pub fn force_flush(&self) -> LifecycleStatus
Flush records queued before this call within the configured bound.
Sourcepub fn shutdown(&self) -> LifecycleStatus
pub fn shutdown(&self) -> LifecycleStatus
Idempotently stop this explicit provider within the configured bound.
Sourcepub fn snapshots(&self) -> Vec<Snapshot>
pub fn snapshots(&self) -> Vec<Snapshot>
Deterministic memory snapshot; empty for disabled/OTLP modes.
Sourcepub fn stats(&self) -> TelemetryStats
pub fn stats(&self) -> TelemetryStats
Sanitized counters suitable for diagnostics.
Trait Implementations§
Source§impl Clone for TelemetryRuntime
impl Clone for TelemetryRuntime
Source§impl Debug for TelemetryRuntime
impl Debug for TelemetryRuntime
Auto Trait Implementations§
impl Freeze for TelemetryRuntime
impl RefUnwindSafe for TelemetryRuntime
impl Send for TelemetryRuntime
impl Sync for TelemetryRuntime
impl Unpin for TelemetryRuntime
impl UnsafeUnpin for TelemetryRuntime
impl UnwindSafe for TelemetryRuntime
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