diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-23 23:52:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-23 23:52:13 +0900 |
| commit | 2622fa3089d1df249276083d157e43b080a59100 (patch) | |
| tree | 43bc31546fd3c81e13e5385cbf5cac493e045691 /crates/mozart-vcs/src/driver/bitbucket.rs | |
| parent | d6e0c6d34449224ac3687daf551a0acfd15cee32 (diff) | |
| download | php-mozart-2622fa3089d1df249276083d157e43b080a59100.tar.gz php-mozart-2622fa3089d1df249276083d157e43b080a59100.tar.zst php-mozart-2622fa3089d1df249276083d157e43b080a59100.zip | |
feat(tracing): instrument network requests with tracing spans
Add #[tracing::instrument] and debug logs to all HTTP-calling
functions in mozart-registry and mozart-vcs for request-level
observability (URL, status code, cache hits, download size).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart-vcs/src/driver/bitbucket.rs')
| -rw-r--r-- | crates/mozart-vcs/src/driver/bitbucket.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/mozart-vcs/src/driver/bitbucket.rs b/crates/mozart-vcs/src/driver/bitbucket.rs index dc7d2cf..d47987d 100644 --- a/crates/mozart-vcs/src/driver/bitbucket.rs +++ b/crates/mozart-vcs/src/driver/bitbucket.rs @@ -62,6 +62,7 @@ impl BitbucketDriver { ) } + #[tracing::instrument(skip(self))] async fn api_get(&self, path: &str) -> Result<serde_json::Value> { let url = self.api_url(path); let mut req = self @@ -76,6 +77,7 @@ impl BitbucketDriver { } let response = req.send().await?; + tracing::debug!(status = %response.status(), %url, "Bitbucket API response"); if !response.status().is_success() { bail!( "Bitbucket API request to {} failed: {}", @@ -86,6 +88,7 @@ impl BitbucketDriver { Ok(response.json().await?) } + #[tracing::instrument(skip(self))] async fn api_get_paginated(&self, path: &str) -> Result<Vec<serde_json::Value>> { let mut items = Vec::new(); let mut next_url = Some(self.api_url(path)); @@ -101,6 +104,7 @@ impl BitbucketDriver { req = req.header(AUTHORIZATION, format!("Basic {key}:{secret}")); } let response = req.send().await?; + tracing::debug!(status = %response.status(), %url, "Bitbucket API paginated response"); if !response.status().is_success() { break; } |
