pub struct TelemetryInstance { /* private fields */ }Expand description
Holds initialized tracing/metrics exporters, etc
Implementations§
Source§impl TelemetryInstance
impl TelemetryInstance
Sourcepub fn trace_subscriber(&self) -> Option<Arc<dyn Subscriber + Send + Sync>>
pub fn trace_subscriber(&self) -> Option<Arc<dyn Subscriber + Send + Sync>>
Return the trace subscriber associated with the telemetry options/instance. Can be used
to manually set the default for a thread or globally using the tracing crate, or with
set_trace_subscriber_for_current_thread.
Sourcepub fn attach_late_init_metrics(&mut self, meter: Arc<dyn CoreMeter + 'static>)
pub fn attach_late_init_metrics(&mut self, meter: Arc<dyn CoreMeter + 'static>)
Some metric meters cannot be initialized until after a tokio runtime has started and after other telemetry has initted (ex: prometheus). They can be attached here.
Sourcepub fn get_temporal_metric_meter(&self) -> Option<TemporalMeter>
pub fn get_temporal_metric_meter(&self) -> Option<TemporalMeter>
Returns our wrapper for metric meters, including the metric_prefix from
TelemetryOptions. This should be used to initialize clients or for any other
temporal-owned metrics. User defined metrics should use Self::get_metric_meter.
Sourcepub fn get_metric_meter(&self) -> Option<TemporalMeter>
pub fn get_metric_meter(&self) -> Option<TemporalMeter>
Returns our wrapper for metric meters, including attaching the service name if enabled.
Auto Trait Implementations§
impl Freeze for TelemetryInstance
impl !RefUnwindSafe for TelemetryInstance
impl Send for TelemetryInstance
impl Sync for TelemetryInstance
impl Unpin for TelemetryInstance
impl UnsafeUnpin for TelemetryInstance
impl !UnwindSafe for TelemetryInstance
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> 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