pub struct TelemetryConfig {
pub enabled: bool,
pub endpoint: String,
pub protocol: OtelProtocol,
pub headers: Vec<(String, String)>,
pub service_name: String,
}Expand description
Configuration for OpenTelemetry telemetry export.
Fields§
§enabled: boolWhether telemetry collection is enabled.
endpoint: StringOTLP collector endpoint URL.
protocol: OtelProtocolOTLP export protocol (gRPC or HTTP/protobuf).
headers: Vec<(String, String)>Additional headers sent with OTLP exports.
service_name: StringThe service.name resource attribute.
Implementations§
Source§impl TelemetryConfig
impl TelemetryConfig
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Build a TelemetryConfig from standard OpenTelemetry environment variables.
Trait Implementations§
Source§impl Clone for TelemetryConfig
impl Clone for TelemetryConfig
Source§fn clone(&self) -> TelemetryConfig
fn clone(&self) -> TelemetryConfig
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 TelemetryConfig
impl Debug for TelemetryConfig
Source§impl Default for TelemetryConfig
impl Default for TelemetryConfig
Source§impl<'de> Deserialize<'de> for TelemetryConfig
impl<'de> Deserialize<'de> for TelemetryConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TelemetryConfig
impl RefUnwindSafe for TelemetryConfig
impl Send for TelemetryConfig
impl Sync for TelemetryConfig
impl Unpin for TelemetryConfig
impl UnsafeUnpin for TelemetryConfig
impl UnwindSafe for TelemetryConfig
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