From 4b8406e4462d975ac0a0668c3bdc532be97bcdc0 Mon Sep 17 00:00:00 2001 From: Sebastian Zivota Date: Mon, 13 Apr 2026 11:29:51 +0200 Subject: [PATCH] ref: Instrument sentry::list_files This is chiefly to get better insight into the cases where 20 results are returned by the Sentry lookup API. --- crates/symbolicator-service/src/download/sentry.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/symbolicator-service/src/download/sentry.rs b/crates/symbolicator-service/src/download/sentry.rs index 8a8a41568..659042119 100644 --- a/crates/symbolicator-service/src/download/sentry.rs +++ b/crates/symbolicator-service/src/download/sentry.rs @@ -155,6 +155,7 @@ impl SentryDownloader { } } + #[tracing::instrument(skip(self, source), fields(query))] pub async fn list_files( &self, source: Arc, @@ -181,6 +182,8 @@ impl SentryDownloader { .append_pair("code_id", code_id.as_str()); } + tracing::Span::current().record("query", index_url.to_string()); + // NOTE: We intentionally don't limit the query to the provided file types, even though // the endpoint supports it. The reason is that the result of the query gets cached locally // and we can then filter the cached results. This saves us from making individual requests to Sentry @@ -225,7 +228,7 @@ impl SentryDownloader { // TODO(flub): These queries do not handle pagination. But sentry only starts to // paginate at 20 results so we get away with this for now. if result.len() >= 20 { - tracing::error!(query = ?query.index_url, "Sentry API Query returned 20 results"); + tracing::error!("Sentry API Query returned 20 results"); } }