pub fn to_exporter_config(&self) -> Option<PrometheusExporterConfig> {
        if let Some(base_url) = &self.pushgateway_url {
            let gateway_endpoint = PrometheusExporterConfig::gateway_endpoint(base_url);
            Some(PrometheusExporterConfig::push(
                gateway_endpoint,
                self.push_interval(),
            ))
        } else {
            self.to_pull_config()
        }
    }
Converts this config to the config for Prometheus exporter. Returns `None` if Prometheus is not configured.
core/lib/config/src/observability_ext/mod.rs