pub struct OtelConfig {
pub disabled: bool,
pub endpoint_configured: bool,
pub traces_endpoint: String,
pub metrics_endpoint: String,
pub headers: Vec<(String, String)>,
pub resource: Resource,
pub capture_content: bool,
}Expand description
Exporter settings resolved from environment variables.
Fields§
§disabled: boolOTEL_SDK_DISABLED=true.
endpoint_configured: boolWhether any OTLP endpoint variable was set explicitly.
traces_endpoint: StringFull URL for trace export (.../v1/traces).
metrics_endpoint: StringFull URL for metric export (.../v1/metrics).
headers: Vec<(String, String)>Extra request headers (e.g. vendor API keys). Values are secrets: never logged.
resource: Resource§capture_content: boolAttach truncated node outputs to spans (GRAPHRT_OTEL_CAPTURE_CONTENT=true).
Implementations§
Source§impl OtelConfig
impl OtelConfig
Sourcepub fn from_env() -> Result<Self, ConfigError>
pub fn from_env() -> Result<Self, ConfigError>
Read the process environment.
Sourcepub fn from_vars(vars: &[(String, String)]) -> Result<Self, ConfigError>
pub fn from_vars(vars: &[(String, String)]) -> Result<Self, ConfigError>
Resolve from explicit variables. Supported: OTEL_SDK_DISABLED,
OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT,
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS,
OTEL_EXPORTER_OTLP_TRACES_HEADERS, OTEL_SERVICE_NAME,
OTEL_RESOURCE_ATTRIBUTES, and GRAPHRT_OTEL_CAPTURE_CONTENT.
Trait Implementations§
Source§impl Clone for OtelConfig
impl Clone for OtelConfig
Source§impl Debug for OtelConfig
impl Debug for OtelConfig
Source§impl Default for OtelConfig
impl Default for OtelConfig
Source§impl PartialEq for OtelConfig
impl PartialEq for OtelConfig
impl StructuralPartialEq for OtelConfig
Auto Trait Implementations§
impl Forget for OtelConfig
impl Freeze for OtelConfig
impl Move 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
Mutably borrows from an owned value. Read more