pub struct TelemetryPipeline { /* private fields */ }Expand description
Real-time telemetry pipeline.
Collects metrics from kernels and broadcasts them to subscribers.
Implementations§
Source§impl TelemetryPipeline
impl TelemetryPipeline
Sourcepub fn new(config: TelemetryConfig) -> Self
pub fn new(config: TelemetryConfig) -> Self
Create a new telemetry pipeline.
Sourcepub fn subscribe(&self) -> Receiver<TelemetryEvent>
pub fn subscribe(&self) -> Receiver<TelemetryEvent>
Subscribe to telemetry events.
Sourcepub fn register_source(&self, source: Arc<dyn MetricsSource>)
pub fn register_source(&self, source: Arc<dyn MetricsSource>)
Register a metrics source.
Sourcepub fn unregister_source(&self, kernel_id: &KernelId)
pub fn unregister_source(&self, kernel_id: &KernelId)
Unregister a metrics source.
Sourcepub fn start(&self) -> JoinHandle<()>
pub fn start(&self) -> JoinHandle<()>
Start the telemetry collection loop.
Sourcepub fn latest_snapshot(&self) -> Option<MetricsSnapshot>
pub fn latest_snapshot(&self) -> Option<MetricsSnapshot>
Get the latest snapshot.
Sourcepub fn history(&self) -> Vec<MetricsSnapshot>
pub fn history(&self) -> Vec<MetricsSnapshot>
Get historical snapshots.
Sourcepub fn aggregate_over(&self, duration: Duration) -> Option<AggregateMetrics>
pub fn aggregate_over(&self, duration: Duration) -> Option<AggregateMetrics>
Get aggregate metrics over a time range.
Auto Trait Implementations§
impl !Freeze for TelemetryPipeline
impl !RefUnwindSafe for TelemetryPipeline
impl Send for TelemetryPipeline
impl Sync for TelemetryPipeline
impl Unpin for TelemetryPipeline
impl !UnwindSafe for TelemetryPipeline
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.