pub struct TelemetryOptionsBuilder { /* private fields */ }Expand description
Builder for TelemetryOptions.
Implementations§
Source§impl TelemetryOptionsBuilder
impl TelemetryOptionsBuilder
Sourcepub fn logging<VALUE: Into<Logger>>(&mut self, value: VALUE) -> &mut Self
pub fn logging<VALUE: Into<Logger>>(&mut self, value: VALUE) -> &mut Self
Optional logger - set as None to disable.
Sourcepub fn metrics<VALUE: Into<Arc<dyn CoreMeter>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn metrics<VALUE: Into<Arc<dyn CoreMeter>>>( &mut self, value: VALUE, ) -> &mut Self
Optional metrics exporter - set as None to disable.
Sourcepub fn attach_service_name(&mut self, value: bool) -> &mut Self
pub fn attach_service_name(&mut self, value: bool) -> &mut Self
If set true (the default) explicitly attach a service_name label to all metrics. Turn this
off if your collection system supports the target_info metric from the OpenMetrics spec.
For more, see
here
Sourcepub fn metric_prefix(&mut self, value: String) -> &mut Self
pub fn metric_prefix(&mut self, value: String) -> &mut Self
A prefix to be applied to all core-created metrics. Defaults to “temporal_”.
Sourcepub fn subscriber_override(
&mut self,
value: Arc<dyn Subscriber + Send + Sync>,
) -> &mut Self
pub fn subscriber_override( &mut self, value: Arc<dyn Subscriber + Send + Sync>, ) -> &mut Self
If provided, logging config will be ignored and this explicit subscriber will be used for all logging and traces.
Sourcepub fn build(&self) -> Result<TelemetryOptions, TelemetryOptionsBuilderError>
pub fn build(&self) -> Result<TelemetryOptions, TelemetryOptionsBuilderError>
Trait Implementations§
Source§impl Clone for TelemetryOptionsBuilder
impl Clone for TelemetryOptionsBuilder
Source§fn clone(&self) -> TelemetryOptionsBuilder
fn clone(&self) -> TelemetryOptionsBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TelemetryOptionsBuilder
impl !RefUnwindSafe for TelemetryOptionsBuilder
impl Send for TelemetryOptionsBuilder
impl Sync for TelemetryOptionsBuilder
impl Unpin for TelemetryOptionsBuilder
impl !UnwindSafe for TelemetryOptionsBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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