pub struct AsyncOtlpExporter { /* private fields */ }Available on crate feature
async only.Expand description
Async HTTP/JSON exporter to an OTLP-compatible collector.
Same wire format and reliability primitives as the blocking
OtlpExporter; the difference is the
I/O path, which runs on the caller’s Tokio runtime.
Retry with full jitter and the tokens-per-window circuit
breaker are shared with the blocking exporter via
crate::backoff.
Implementations§
Source§impl AsyncOtlpExporter
impl AsyncOtlpExporter
Sourcepub fn builder() -> AsyncOtlpExporterBuilder
pub fn builder() -> AsyncOtlpExporterBuilder
Start building a new async exporter.
Sourcepub async fn export_one(&self, record: &Log) -> OtlpResult<()>
pub async fn export_one(&self, record: &Log) -> OtlpResult<()>
Sourcepub async fn export_batch(&self, records: &[Log]) -> OtlpResult<()>
pub async fn export_batch(&self, records: &[Log]) -> OtlpResult<()>
Export a batch of records in a single HTTP POST.
§Errors
Returns OtlpError::Serialise on serialisation failure,
OtlpError::BadStatus on non-2xx response,
OtlpError::CircuitOpen if the breaker is tripped, or
OtlpError::AsyncTransport when the collector cannot be
reached, times out, or answers with something other than
HTTP/1.x.
Trait Implementations§
Source§impl Clone for AsyncOtlpExporter
impl Clone for AsyncOtlpExporter
Auto Trait Implementations§
impl Forget for AsyncOtlpExporter
impl Freeze for AsyncOtlpExporter
impl RefUnwindSafe for AsyncOtlpExporter
impl Send for AsyncOtlpExporter
impl Sync for AsyncOtlpExporter
impl Unpin for AsyncOtlpExporter
impl UnsafeUnpin for AsyncOtlpExporter
impl UnwindSafe for AsyncOtlpExporter
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