Enum opentelemetry_otlp::LogExporter
source · pub enum LogExporter {
Tonic {
timeout: Duration,
metadata: Option<MetadataMap>,
log_exporter: LogsServiceClient<Channel>,
},
Grpcio {
timeout: Duration,
headers: Option<HashMap<String, String>>,
log_exporter: LogsServiceClient,
},
Http {
timeout: Duration,
headers: Option<HashMap<String, String>>,
collector_endpoint: Uri,
log_exporter: Option<Arc<dyn HttpClient>>,
},
}
Available on crate feature
logs
only.Expand description
OTLP exporter that sends log data
Variants§
Tonic
Fields
§
metadata: Option<MetadataMap>
Additional headers of the outbound requests.
§
log_exporter: LogsServiceClient<Channel>
The Grpc log exporter
Available on crate feature
grpc-tonic
only.Log Exporter using tonic as grpc layer.
Grpcio
Fields
§
log_exporter: LogsServiceClient
The Grpc log exporter
Available on crate feature
grpc-sys
only.Log Exporter using grpcio as grpc layer
Http
Fields
§
log_exporter: Option<Arc<dyn HttpClient>>
The HTTP log exporter
Available on crate feature
http-proto
only.Log Exporter using HTTP transport
Implementations§
source§impl LogExporter
impl LogExporter
sourcepub fn new_tonic(
config: ExportConfig,
tonic_config: TonicConfig
) -> Result<Self, Error>
Available on crate feature grpc-tonic
only.
pub fn new_tonic( config: ExportConfig, tonic_config: TonicConfig ) -> Result<Self, Error>
grpc-tonic
only.Builds a new log exporter with the given configuration.
sourcepub fn from_tonic_channel(
config: ExportConfig,
tonic_config: TonicConfig,
channel: Channel
) -> Result<Self, Error>
Available on crate feature grpc-tonic
only.
pub fn from_tonic_channel( config: ExportConfig, tonic_config: TonicConfig, channel: Channel ) -> Result<Self, Error>
grpc-tonic
only.Builds a new log exporter with given tonic channel.
This allows users to bring their own custom channel like UDS.
However, users MUST make sure the ExportConfig::timeout
is
the same as the channel’s timeout.
sourcepub fn new_grpcio(config: ExportConfig, grpcio_config: GrpcioConfig) -> Self
Available on crate feature grpc-sys
only.
pub fn new_grpcio(config: ExportConfig, grpcio_config: GrpcioConfig) -> Self
grpc-sys
only.Builds a new log exporter with the given configuration
sourcepub fn new_http(
config: ExportConfig,
http_config: HttpConfig
) -> Result<Self, Error>
Available on crate feature http-proto
only.
pub fn new_http( config: ExportConfig, http_config: HttpConfig ) -> Result<Self, Error>
http-proto
only.Builds a new log exporter with the given configuration
Trait Implementations§
source§impl Debug for LogExporter
impl Debug for LogExporter
source§impl LogExporter for LogExporter
impl LogExporter for LogExporter
Auto Trait Implementations§
impl !RefUnwindSafe for LogExporter
impl Send for LogExporter
impl Sync for LogExporter
impl Unpin for LogExporter
impl !UnwindSafe for LogExporter
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> 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