Skip to content

Commit

Permalink
Improve tracing for keyring provider (#3207)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Apr 23, 2024
1 parent 598a67c commit b8302d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/uv-auth/src/keyring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ impl KeyringProvider {
///
/// Returns [`None`] if no password was found for the username or if any errors
/// are encountered in the keyring backend.
#[instrument(skip_all, fields(url = % url.to_string(), username))]
pub(crate) async fn fetch(&self, url: &Url, username: &str) -> Option<Credentials> {
// Validate the request
debug_assert!(
Expand Down Expand Up @@ -104,7 +105,7 @@ impl KeyringProvider {
password.map(|password| Credentials::new(Some(username.to_string()), Some(password)))
}

#[instrument]
#[instrument(skip(self))]
async fn fetch_subprocess(&self, service_name: &str, username: &str) -> Option<String> {
let output = Command::new("keyring")
.arg("get")
Expand Down

0 comments on commit b8302d4

Please sign in to comment.