pub struct LogExporterBuilder<C> { /* private fields */ }
Available on crate feature
logs
and (crate features http-proto
or http-json
or grpc-tonic
) only.Expand description
Builder for creating a new LogExporter.
Implementations§
Source§impl LogExporterBuilder<NoExporterBuilderSet>
impl LogExporterBuilder<NoExporterBuilderSet>
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new LogExporterBuilder with default settings.
Sourcepub fn with_tonic(self) -> LogExporterBuilder<TonicExporterBuilderSet>
Available on crate feature grpc-tonic
only.
pub fn with_tonic(self) -> LogExporterBuilder<TonicExporterBuilderSet>
grpc-tonic
only.With the gRPC Tonic transport.
Sourcepub fn with_http(self) -> LogExporterBuilder<HttpExporterBuilderSet>
Available on crate features http-proto
or http-json
only.
pub fn with_http(self) -> LogExporterBuilder<HttpExporterBuilderSet>
http-proto
or http-json
only.With the HTTP transport.
Source§impl LogExporterBuilder<TonicExporterBuilderSet>
impl LogExporterBuilder<TonicExporterBuilderSet>
Sourcepub fn build(self) -> Result<LogExporter, ExporterBuildError>
Available on crate feature grpc-tonic
only.
pub fn build(self) -> Result<LogExporter, ExporterBuildError>
grpc-tonic
only.Build the LogExporter with the gRPC Tonic transport.
Source§impl LogExporterBuilder<HttpExporterBuilderSet>
impl LogExporterBuilder<HttpExporterBuilderSet>
Sourcepub fn build(self) -> Result<LogExporter, ExporterBuildError>
Available on crate features http-proto
or http-json
only.
pub fn build(self) -> Result<LogExporter, ExporterBuildError>
http-proto
or http-json
only.Build the LogExporter with the HTTP transport.
Trait Implementations§
Source§impl<C: Clone> Clone for LogExporterBuilder<C>
impl<C: Clone> Clone for LogExporterBuilder<C>
Source§fn clone(&self) -> LogExporterBuilder<C>
fn clone(&self) -> LogExporterBuilder<C>
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 moreSource§impl<C: Debug> Debug for LogExporterBuilder<C>
impl<C: Debug> Debug for LogExporterBuilder<C>
Source§impl<C: Default> Default for LogExporterBuilder<C>
impl<C: Default> Default for LogExporterBuilder<C>
Source§fn default() -> LogExporterBuilder<C>
fn default() -> LogExporterBuilder<C>
Returns the “default value” for a type. Read more
Source§impl HasExportConfig for LogExporterBuilder<HttpExporterBuilderSet>
Available on crate features http-proto
or http-json
only.
impl HasExportConfig for LogExporterBuilder<HttpExporterBuilderSet>
Available on crate features
http-proto
or http-json
only.Source§fn export_config(&mut self) -> &mut ExportConfig
fn export_config(&mut self) -> &mut ExportConfig
Return a mutable reference to the ExportConfig within the exporter builders.
Source§impl HasExportConfig for LogExporterBuilder<TonicExporterBuilderSet>
Available on crate feature grpc-tonic
only.
impl HasExportConfig for LogExporterBuilder<TonicExporterBuilderSet>
Available on crate feature
grpc-tonic
only.Source§fn export_config(&mut self) -> &mut ExportConfig
fn export_config(&mut self) -> &mut ExportConfig
Return a mutable reference to the ExportConfig within the exporter builders.
Source§impl HasHttpConfig for LogExporterBuilder<HttpExporterBuilderSet>
Available on crate features http-proto
or http-json
only.
impl HasHttpConfig for LogExporterBuilder<HttpExporterBuilderSet>
Available on crate features
http-proto
or http-json
only.Source§fn http_client_config(&mut self) -> &mut HttpConfig
fn http_client_config(&mut self) -> &mut HttpConfig
Return a mutable reference to the config within the exporter builders.
Source§impl HasTonicConfig for LogExporterBuilder<TonicExporterBuilderSet>
Available on crate feature grpc-tonic
only.
impl HasTonicConfig for LogExporterBuilder<TonicExporterBuilderSet>
Available on crate feature
grpc-tonic
only.Source§fn tonic_config(&mut self) -> &mut TonicConfig
fn tonic_config(&mut self) -> &mut TonicConfig
Return a mutable reference to the export config within the exporter builders.
Auto Trait Implementations§
impl<C> Freeze for LogExporterBuilder<C>where
C: Freeze,
impl<C> RefUnwindSafe for LogExporterBuilder<C>where
C: RefUnwindSafe,
impl<C> Send for LogExporterBuilder<C>where
C: Send,
impl<C> Sync for LogExporterBuilder<C>where
C: Sync,
impl<C> Unpin for LogExporterBuilder<C>where
C: Unpin,
impl<C> UnwindSafe for LogExporterBuilder<C>where
C: UnwindSafe,
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> 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> 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
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<B> WithExportConfig for Bwhere
B: HasExportConfig,
impl<B> WithExportConfig for Bwhere
B: HasExportConfig,
Source§fn with_endpoint<T>(self, endpoint: T) -> B
fn with_endpoint<T>(self, endpoint: T) -> B
Set the address of the OTLP collector. If not set or set to empty string, the default address is used. Read more
Source§fn with_protocol(self, protocol: Protocol) -> B
fn with_protocol(self, protocol: Protocol) -> B
Set the protocol to use when communicating with the collector. Read more
Source§fn with_timeout(self, timeout: Duration) -> B
fn with_timeout(self, timeout: Duration) -> B
Set the timeout to the collector. Read more
Source§fn with_export_config(self, exporter_config: ExportConfig) -> B
fn with_export_config(self, exporter_config: ExportConfig) -> B
Set export config. This will override all previous configurations. Read more
Source§impl<B> WithHttpConfig for Bwhere
B: HasHttpConfig,
impl<B> WithHttpConfig for Bwhere
B: HasHttpConfig,
Source§fn with_http_client<T>(self, client: T) -> Bwhere
T: HttpClient + 'static,
fn with_http_client<T>(self, client: T) -> Bwhere
T: HttpClient + 'static,
Available on crate features
http-proto
or http-json
only.Assign client implementation
Source§fn with_headers(self, headers: HashMap<String, String>) -> B
fn with_headers(self, headers: HashMap<String, String>) -> B
Available on crate features
http-proto
or http-json
only.Set additional headers to send to the collector.
Source§fn with_compression(self, compression: Compression) -> B
fn with_compression(self, compression: Compression) -> B
Available on crate features
http-proto
or http-json
only.Set the compression algorithm to use when communicating with the collector.
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<B> WithTonicConfig for Bwhere
B: HasTonicConfig,
impl<B> WithTonicConfig for Bwhere
B: HasTonicConfig,
Source§fn with_metadata(self, metadata: MetadataMap) -> B
Available on crate feature grpc-tonic
only.
fn with_metadata(self, metadata: MetadataMap) -> B
grpc-tonic
only.Set custom metadata entries to send to the collector.
Source§fn with_tls_config(self, tls_config: ClientTlsConfig) -> B
fn with_tls_config(self, tls_config: ClientTlsConfig) -> B
Available on crate features
grpc-tonic
and tls
only.Set the TLS settings for the collector endpoint.
Source§fn with_compression(self, compression: Compression) -> B
fn with_compression(self, compression: Compression) -> B
Available on crate feature
grpc-tonic
only.Set the compression algorithm to use when communicating with the collector.
Source§fn with_channel(self, channel: Channel) -> B
fn with_channel(self, channel: Channel) -> B
Available on crate feature
grpc-tonic
only.Use
channel
as tonic’s transport channel.
this will override tls config and should only be used
when working with non-HTTP transports. Read moreSource§fn with_interceptor<I>(self, interceptor: I) -> B
fn with_interceptor<I>(self, interceptor: I) -> B
Available on crate feature
grpc-tonic
only.Use a custom
interceptor
to modify each outbound request.
This can be used to modify the gRPC metadata, for example
to inject auth tokens. Read more