pub struct MetricsConfig {
pub enabled: bool,
pub otlp_headers: HashMap<String, String>,
pub otlp_endpoint: Option<String>,
pub otlp_protocol: String,
pub metric_export_interval_ms: u64,
}Fields§
§enabled: bool§otlp_headers: HashMap<String, String>§otlp_endpoint: Option<String>OTLP endpoint URL for metrics export. Falls back to the shared
OTEL_EXPORTER_OTLP_ENDPOINT when OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
is unset.
otlp_protocol: StringOTLP transport protocol for metrics. See LoggingConfig::otlp_protocol.
metric_export_interval_ms: u64How often (in milliseconds) the PeriodicReader pushes metrics to the
OTLP endpoint. Parsed from OTEL_METRIC_EXPORT_INTERVAL (OTel spec).
Default: 60 000 ms (60 seconds).
Trait Implementations§
Source§impl Clone for MetricsConfig
impl Clone for MetricsConfig
Source§fn clone(&self) -> MetricsConfig
fn clone(&self) -> MetricsConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MetricsConfig
impl Debug for MetricsConfig
Source§impl Default for MetricsConfig
impl Default for MetricsConfig
Source§impl<'de> Deserialize<'de> for MetricsConfigwhere
MetricsConfig: Default,
impl<'de> Deserialize<'de> for MetricsConfigwhere
MetricsConfig: Default,
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
impl Eq for MetricsConfig
Source§impl PartialEq for MetricsConfig
impl PartialEq for MetricsConfig
Source§impl Serialize for MetricsConfig
impl Serialize for MetricsConfig
impl StructuralPartialEq for MetricsConfig
Auto Trait Implementations§
impl Freeze for MetricsConfig
impl RefUnwindSafe for MetricsConfig
impl Send for MetricsConfig
impl Sync for MetricsConfig
impl Unpin for MetricsConfig
impl UnsafeUnpin for MetricsConfig
impl UnwindSafe for MetricsConfig
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