Struct opentelemetry::sdk::export::metrics::StdoutExporterBuilder
source · [−]pub struct StdoutExporterBuilder<W> { /* private fields */ }
Available on crate feature
metrics
only.Expand description
Configuration for a given stdout exporter.
Implementations
sourceimpl<W> StdoutExporterBuilder<W>where
W: 'static + Write + Debug + Send + Sync,
impl<W> StdoutExporterBuilder<W>where
W: 'static + Write + Debug + Send + Sync,
sourcepub fn with_writer<W2>(self, writer: W2) -> StdoutExporterBuilder<W2>where
W2: Write,
pub fn with_writer<W2>(self, writer: W2) -> StdoutExporterBuilder<W2>where
W2: Write,
Set the writer that this exporter will use.
sourcepub fn with_do_not_print_time(
self,
do_not_print_time: bool
) -> StdoutExporterBuilder<W>
pub fn with_do_not_print_time(
self,
do_not_print_time: bool
) -> StdoutExporterBuilder<W>
Hide the timestamps from exported results
sourcepub fn with_attribute_encoder<E>(
self,
attribute_encoder: E
) -> StdoutExporterBuilder<W>where
E: 'static + Encoder + Send + Sync,
pub fn with_attribute_encoder<E>(
self,
attribute_encoder: E
) -> StdoutExporterBuilder<W>where
E: 'static + Encoder + Send + Sync,
Set the attribute encoder that this exporter will use.
sourcepub fn with_formatter<T>(self, formatter: T) -> StdoutExporterBuilder<W>where
T: 'static + Fn(Vec<ExportLine, Global>) -> Result<String, MetricsError> + Send + Sync,
pub fn with_formatter<T>(self, formatter: T) -> StdoutExporterBuilder<W>where
T: 'static + Fn(Vec<ExportLine, Global>) -> Result<String, MetricsError> + Send + Sync,
Set a formatter for serializing export batch data
sourcepub fn build(self) -> Result<StdoutExporter<W>, MetricsError>
pub fn build(self) -> Result<StdoutExporter<W>, MetricsError>
Build a new push controller, returning errors if they arise.
Trait Implementations
Auto Trait Implementations
impl<W> !RefUnwindSafe for StdoutExporterBuilder<W>
impl<W> Send for StdoutExporterBuilder<W>where
W: Send,
impl<W> Sync for StdoutExporterBuilder<W>where
W: Send,
impl<W> Unpin for StdoutExporterBuilder<W>where
W: Unpin,
impl<W> !UnwindSafe for StdoutExporterBuilder<W>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more