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.
Trait Implementations§
Source§impl CoreTelemetry for TelemetryInstance
impl CoreTelemetry for TelemetryInstance
Source§fn fetch_buffered_logs(&self) -> Vec<CoreLog>
fn fetch_buffered_logs(&self) -> Vec<CoreLog>
Each worker buffers logs that should be shuttled over to lang so that they may be rendered
with the user’s desired logging library. Use this function to grab the most recent buffered
logs since the last time it was called. A fixed number of such logs are retained at maximum,
with the oldest being dropped when full. Read more
Auto Trait Implementations§
impl !Freeze for TelemetryInstance
impl !RefUnwindSafe for TelemetryInstance
impl Send for TelemetryInstance
impl Sync for TelemetryInstance
impl Unpin 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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§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