pub fn try_init(mut self) -> metrics::Result<PushController> {
        let period = self.period.take();
        let (spawn, interval, exporter) = self.try_build()?;
        let mut push_builder = controllers::push(
            simple::Selector::Exact,
            ExportKindSelector::Stateless,
            exporter,
            spawn,
            interval,
        )
        .with_stateful(true);
        if let Some(period) = period {
            push_builder = push_builder.with_period(period);
        }

        let controller = push_builder.build();
        global::set_meter_provider(controller.provider());
        Ok(controller)
    }
/// Build a new push controller, returning errors if they arise.
Build a new push controller, returning errors if they arise.
Build a new push controller returning errors if they arise .
pub fn try_init(mut self) -> metrics::Result<PushController> {
        let period = self.period.take();
        let (spawn, interval, exporter) = self.try_build()?;
        let mut push_builder = controllers::push(
            simple::Selector::Exact,
            ExportKindSelector::Stateless,
            exporter,
            spawn,
            interval,
        )
        .with_stateful(true);
        if let Some(period) = period {
            push_builder = push_builder.with_period(period);
        }
        let controller = push_builder.build();
        global::set_meter_provider(controller.provider());
        Ok(controller)
    }
pub fn try_init ( mut self ) -> metrics :: Result < PushController > { let period = self . period . take ( ) ; let ( spawn , interval , exporter ) = self . try_build ( ) ? ; let mut push_builder = controllers :: push ( simple :: Selector :: Exact , ExportKindSelector :: Stateless , exporter , spawn , interval , ) . with_stateful ( true ) ; if let Some ( period ) = period { push_builder = push_builder . with_period ( period ) ; } let controller = push_builder . build ( ) ; global :: set_meter_provider ( controller . provider ( ) ) ; Ok ( controller ) }
Build a new push controller, returning errors if they arise.
Build a new push controller returning errors if they arise .
mut self
mut self