pub struct OtelConfig {
pub enabled: bool,
pub service_name: Option<String>,
pub endpoint: Option<String>,
pub headers: HashMap<String, String>,
}Expand description
Configuration for OpenTelemetry integration.
Inert. It used to drive an OTLP exporter; that exporter is gone (see the module
docs for why), and nothing reads these fields any more except the enabled flag,
which setup_logging warns about so an operator who configured a collector is
told to their face that nothing is being sent.
It is kept, rather than deleted with the exporter, because it lives in the types
feature and four backends name it in a LoggingConfig struct literal. It carries no
dependency of its own – a bool, two Option<String>s and a map – so keeping it
costs nothing and removing it would be a source break with no compile-time benefit.
It is also the seam to reattach an exporter to, if one ever comes back on a
tokio-free transport.
Fields§
§enabled: boolWhether OTel log/trace forwarding was requested. Requesting it now only warns.
service_name: Option<String>Service name that would identify this application to a collector.
endpoint: Option<String>OTLP collector endpoint (e.g., “http://localhost:4318”).
headers: HashMap<String, String>Additional headers that would be sent with OTLP requests (e.g., authentication).
Trait Implementations§
Source§impl Clone for OtelConfig
impl Clone for OtelConfig
Source§impl Debug for OtelConfig
impl Debug for OtelConfig
Auto Trait Implementations§
impl Freeze for OtelConfig
impl RefUnwindSafe for OtelConfig
impl Send for OtelConfig
impl Sync for OtelConfig
impl Unpin for OtelConfig
impl UnsafeUnpin for OtelConfig
impl UnwindSafe for OtelConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more