pub struct TelemetryExtension {
pub node: String,
pub bus: TelemetryBus,
pub actors: Arc<ActorRegistry>,
pub dead_letters: Arc<DeadLetterFeed>,
pub cluster: Arc<ClusterProbe>,
pub sharding: Arc<ShardingProbe>,
pub persistence: Arc<PersistenceProbe>,
pub remote: Arc<RemoteProbe>,
pub streams: Arc<StreamsProbe>,
pub ddata: Arc<DDataProbe>,
/* private fields */
}Expand description
The telemetry extension. Construct once per actor system, register via the actor system’s extensions, and all other probes will pick it up.
Fields§
§node: String§bus: TelemetryBus§actors: Arc<ActorRegistry>§dead_letters: Arc<DeadLetterFeed>§cluster: Arc<ClusterProbe>§sharding: Arc<ShardingProbe>§persistence: Arc<PersistenceProbe>§remote: Arc<RemoteProbe>§streams: Arc<StreamsProbe>§ddata: Arc<DDataProbe>Implementations§
Source§impl TelemetryExtension
impl TelemetryExtension
Sourcepub fn new(node: impl Into<String>, channel_capacity: usize) -> Arc<Self>
pub fn new(node: impl Into<String>, channel_capacity: usize) -> Arc<Self>
Build a telemetry extension for the given node name. Channel
capacity controls how many in-flight TelemetryEvents the broadcast
bus will buffer per subscriber.
Sourcepub fn install(self: Arc<Self>, system: &ActorSystem) -> Arc<Self>
pub fn install(self: Arc<Self>, system: &ActorSystem) -> Arc<Self>
Install this extension on the given ActorSystem. Returns a clone
of the shared Arc<TelemetryExtension>; the caller may keep it to
feed probes directly from application code.
Sourcepub fn from_system(system: &ActorSystem) -> Option<Arc<Self>>
pub fn from_system(system: &ActorSystem) -> Option<Arc<Self>>
Look up an installed extension on an ActorSystem.
Sourcepub fn add_exporter(&self, exporter: Arc<dyn Exporter>)
pub fn add_exporter(&self, exporter: Arc<dyn Exporter>)
Register an exporter. Exporters receive every event published to the bus and may poll probes for snapshots on their own cadence.
Sourcepub fn snapshot(&self) -> NodeSnapshot
pub fn snapshot(&self) -> NodeSnapshot
Snapshot the full telemetry state of this node (one JSON payload).
Auto Trait Implementations§
impl !Freeze for TelemetryExtension
impl !RefUnwindSafe for TelemetryExtension
impl Send for TelemetryExtension
impl Sync for TelemetryExtension
impl Unpin for TelemetryExtension
impl UnsafeUnpin for TelemetryExtension
impl !UnwindSafe for TelemetryExtension
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request