pub struct RuntimeDiagnosticsService { /* private fields */ }Expand description
One owned, idempotently initialized sampler and optional HTTP listener.
Clones share initialization. Keep one instance at the composition root; constructing another service creates a separate owner. Dropping this handle does not detach its tasks from the supplied parent. Shutdown cancels and awaits both outputs using the caller’s deadline.
Implementations§
Source§impl RuntimeDiagnosticsService
impl RuntimeDiagnosticsService
pub fn new( parent: &ChildServiceContext, component: RuntimeComponent, telemetry: TelemetryHandle, provider: Arc<dyn RuntimeDiagnosticsDataProvider>, ) -> Self
Sourcepub async fn start(
&self,
mode: RuntimeDiagnosticsMode,
) -> Result<RuntimeDiagnosticsStarted, ObservabilityError>
pub async fn start( &self, mode: RuntimeDiagnosticsMode, ) -> Result<RuntimeDiagnosticsStarted, ObservabilityError>
Starts exactly the requested outputs for this service instance.
§Errors
Returns a sanitized error for invalid sampling bounds, endpoint setup, closed ownership, or reinitialization with a different configuration.
pub async fn shutdown_until(&self, deadline: ShutdownDeadline) -> ShutdownReport
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeDiagnosticsService
impl !UnwindSafe for RuntimeDiagnosticsService
impl Freeze for RuntimeDiagnosticsService
impl Send for RuntimeDiagnosticsService
impl Sync for RuntimeDiagnosticsService
impl Unpin for RuntimeDiagnosticsService
impl UnsafeUnpin for RuntimeDiagnosticsService
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