pub enum ExportProtocol {
Grpc,
}Expand description
OTLP export protocol.
Selects between gRPC/tonic and HTTP/protobuf transports. When not set
explicitly, the builder reads OTEL_EXPORTER_OTLP_PROTOCOL. If both the
grpc and http features are compiled in and neither the builder nor the
env var specifies a protocol, grpc is used.
Each variant is only present when its corresponding feature is enabled, so match expressions are always exhaustive without a fallback arm.
§Example
use otel_bootstrap::{ExportProtocol, Telemetry};
let _handles = Telemetry::builder("my-service")
.with_protocol(ExportProtocol::Grpc)
.init()
.unwrap();Variants§
Grpc
gRPC via tonic (requires the grpc feature).
Trait Implementations§
Source§impl Clone for ExportProtocol
impl Clone for ExportProtocol
Source§fn clone(&self) -> ExportProtocol
fn clone(&self) -> ExportProtocol
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 Debug for ExportProtocol
impl Debug for ExportProtocol
Source§impl PartialEq for ExportProtocol
impl PartialEq for ExportProtocol
impl Copy for ExportProtocol
impl Eq for ExportProtocol
impl StructuralPartialEq for ExportProtocol
Auto Trait Implementations§
impl Freeze for ExportProtocol
impl RefUnwindSafe for ExportProtocol
impl Send for ExportProtocol
impl Sync for ExportProtocol
impl Unpin for ExportProtocol
impl UnsafeUnpin for ExportProtocol
impl UnwindSafe for ExportProtocol
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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