Enum opentelemetry_otlp::SpanExporter
source · pub enum SpanExporter {
Tonic {
timeout: Duration,
metadata: Option<MetadataMap>,
trace_exporter: TraceServiceClient<Channel>,
},
}
Expand description
OTLP exporter that sends tracing information
Variants§
Tonic
Fields
§
metadata: Option<MetadataMap>
Additional headers of the outbound requests.
Trace Exporter using tonic as grpc layer.
Implementations§
source§impl SpanExporter
impl SpanExporter
sourcepub fn new_tonic(
config: ExportConfig,
tonic_config: TonicConfig
) -> Result<Self, Error>
pub fn new_tonic( config: ExportConfig, tonic_config: TonicConfig ) -> Result<Self, Error>
Builds a new span exporter with the given configuration.
sourcepub fn from_tonic_channel(
config: ExportConfig,
tonic_config: TonicConfig,
channel: Channel
) -> Result<Self, Error>
pub fn from_tonic_channel( config: ExportConfig, tonic_config: TonicConfig, channel: Channel ) -> Result<Self, Error>
Builds a new span 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.
Trait Implementations§
source§impl Debug for SpanExporter
impl Debug for SpanExporter
source§impl SpanExporter for SpanExporter
impl SpanExporter for SpanExporter
source§fn export<'life0, 'async_trait>(
&'life0 mut self,
batch: Vec<SpanData>
) -> Pin<Box<dyn Future<Output = ExportResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn export<'life0, 'async_trait>( &'life0 mut self, batch: Vec<SpanData> ) -> Pin<Box<dyn Future<Output = ExportResult> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Exports a batch of readable spans. Protocol exporters that will
implement this function are typically expected to serialize and transmit
the data to the destination. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SpanExporter
impl Send for SpanExporter
impl Sync for SpanExporter
impl Unpin for SpanExporter
impl !UnwindSafe for SpanExporter
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> 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