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§
source§impl<W> StdoutExporterBuilder<W>where
W: Write + Debug + Send + Sync + 'static,
impl<W> StdoutExporterBuilder<W>where W: Write + Debug + Send + Sync + 'static,
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: Encoder + Send + Sync + 'static,
pub fn with_attribute_encoder<E>( self, attribute_encoder: E ) -> StdoutExporterBuilder<W>where E: Encoder + Send + Sync + 'static,
Set the attribute encoder that this exporter will use.
sourcepub fn with_formatter<T>(self, formatter: T) -> StdoutExporterBuilder<W>where
T: Fn(Vec<ExportLine, Global>) -> Result<String, MetricsError> + Send + Sync + 'static,
pub fn with_formatter<T>(self, formatter: T) -> StdoutExporterBuilder<W>where T: Fn(Vec<ExportLine, Global>) -> Result<String, MetricsError> + Send + Sync + 'static,
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.