fn default() -> Self {
        let mut config = Config {
            sampler: Box::new(Sampler::ParentBased(Box::new(Sampler::AlwaysOn))),
            id_generator: Box::new(sdk::trace::IdGenerator::default()),
            span_limits: SpanLimits::default(),
            resource: None,
        };

        if let Some(max_attributes_per_span) = env::var("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")
            .ok()
            .and_then(|count_limit| u32::from_str(&count_limit).ok())
        {
            config.span_limits.max_attributes_per_span = max_attributes_per_span;
        }

        if let Some(max_events_per_span) = env::var("OTEL_SPAN_EVENT_COUNT_LIMIT")
            .ok()
            .and_then(|max_events| u32::from_str(&max_events).ok())
        {
            config.span_limits.max_events_per_span = max_events_per_span;
        }

        if let Some(max_links_per_span) = env::var("OTEL_SPAN_LINK_COUNT_LIMIT")
            .ok()
            .and_then(|max_links| u32::from_str(&max_links).ok())
        {
            config.span_limits.max_links_per_span = max_links_per_span;
        }

        config
    }
/// Create default global sdk configuration.
Create default global sdk configuration.
Create default global sdk configuration .
fn default() -> Self {
        let mut config = Config {
            sampler: Box::new(Sampler::ParentBased(Box::new(Sampler::AlwaysOn))),
            id_generator: Box::new(sdk::trace::IdGenerator::default()),
            span_limits: SpanLimits::default(),
            resource: None,
        };
        if let Some(max_attributes_per_span) = env::var("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")
            .ok()
            .and_then(|count_limit| u32::from_str(&count_limit).ok())
        {
            config.span_limits.max_attributes_per_span = max_attributes_per_span;
        }
        if let Some(max_events_per_span) = env::var("OTEL_SPAN_EVENT_COUNT_LIMIT")
            .ok()
            .and_then(|max_events| u32::from_str(&max_events).ok())
        {
            config.span_limits.max_events_per_span = max_events_per_span;
        }
        if let Some(max_links_per_span) = env::var("OTEL_SPAN_LINK_COUNT_LIMIT")
            .ok()
            .and_then(|max_links| u32::from_str(&max_links).ok())
        {
            config.span_limits.max_links_per_span = max_links_per_span;
        }
        config
    }
fn default ( ) -> Self { let mut config = Config { sampler : Box :: new ( Sampler :: ParentBased ( Box :: new ( Sampler :: AlwaysOn ) ) ) , id_generator : Box :: new ( sdk :: trace :: IdGenerator :: default ( ) ) , span_limits : SpanLimits :: default ( ) , resource : None , } ; if let Some ( max_attributes_per_span ) = env :: var ( " " ) . ok ( ) . and_then ( | count_limit | u32 :: from_str ( & count_limit ) . ok ( ) ) { config . span_limits . max_attributes_per_span = max_attributes_per_span ; } if let Some ( max_events_per_span ) = env :: var ( " " ) . ok ( ) . and_then ( | max_events | u32 :: from_str ( & max_events ) . ok ( ) ) { config . span_limits . max_events_per_span = max_events_per_span ; } if let Some ( max_links_per_span ) = env :: var ( " " ) . ok ( ) . and_then ( | max_links | u32 :: from_str ( & max_links ) . ok ( ) ) { config . span_limits . max_links_per_span = max_links_per_span ; } config }
Create default global sdk configuration.
Create default global sdk configuration .