Skip to content

Commit

Permalink
Add some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mwylde committed Jan 8, 2025
1 parent 60d590f commit 6cf294c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/arroyo-storage/src/aws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::error::Error;
use std::sync::Arc;
use std::time::{Duration, Instant};
use tokio::sync::OnceCell;
use tracing::info;

pub struct ArroyoCredentialProvider {
cache: TokenCache<Arc<AwsCredential>>,
Expand Down Expand Up @@ -66,13 +67,15 @@ impl ArroyoCredentialProvider {
async fn get_token(
provider: &SharedCredentialsProvider,
) -> Result<TemporaryToken<Arc<AwsCredential>>, Box<dyn Error + Send + Sync>> {
info!("Getting credentials");
let creds = provider
.provide_credentials()
.await
.map_err(|e| object_store::Error::Generic {
store: "S3",
source: Box::new(e),
})?;
info!("Got credentials = {:?}", creds);
let expiry = creds
.expiry()
.map(|exp| Instant::now() + exp.elapsed().unwrap_or_default());
Expand Down

0 comments on commit 6cf294c

Please sign in to comment.