Skip to content

Commit

Permalink
azure store logging
Browse files Browse the repository at this point in the history
  • Loading branch information
aditanase committed Nov 7, 2024
1 parent e907bf8 commit b89edbe
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions object_store/src/azure/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use serde::{Deserialize, Serialize};
use snafu::{OptionExt, ResultExt, Snafu};
use std::str::FromStr;
use std::sync::Arc;
use tracing::debug;
use url::Url;

/// The well-known account used by Azurite and the legacy Azure Storage Emulator.
Expand Down Expand Up @@ -867,6 +868,7 @@ impl MicrosoftAzureBuilder {

/// Configure a connection to container with given name on Microsoft Azure Blob store.
pub fn build(mut self) -> Result<MicrosoftAzure> {
debug!("[TASE-BLD-1] open builder");
if let Some(url) = self.url.take() {
self.parse_url(&url)?;
}
Expand Down Expand Up @@ -961,17 +963,21 @@ impl MicrosoftAzureBuilder {
} else if let (Some(client_id), Some(client_secret), Some(tenant_id)) =
(&self.client_id, self.client_secret, &self.tenant_id)
{
debug!("[TASE-BLD-2] cred start");
let client_credential = ClientSecretOAuthProvider::new(
client_id.clone(),
client_secret,
tenant_id,
self.authority_host,
);
Arc::new(TokenCredentialProvider::new(
debug!("[TASE-BLD-3] ClientSecretOAuthProvider");
let aa = Arc::new(TokenCredentialProvider::new(
client_credential,
self.client_options.client()?,
self.retry_config.clone(),
)) as _
)) as _;
debug!("[TASE-BLD-4] TokenCredentialProvider");
aa
} else if let Some(query_pairs) = self.sas_query_pairs {
static_creds(AzureCredential::SASToken(query_pairs))
} else if let Some(sas) = self.sas_key {
Expand Down Expand Up @@ -1005,9 +1011,11 @@ impl MicrosoftAzureBuilder {
service: storage_url,
credentials: auth,
};
debug!("[TASE-BLD-5] before azure client");

let client = Arc::new(AzureClient::new(config)?);

debug!("[TASE-BLD-n] build()");
Ok(MicrosoftAzure { client })
}
}
Expand Down

0 comments on commit b89edbe

Please sign in to comment.