Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Log extension queries to axiom (#13752)

Conrad Irwinb7cb2381f251
diff --git a/crates/collab/src/api/extensions.rs b/crates/collab/src/api/extensions.rs
index 03b07c07dcf..4f797adb689 100644
--- a/crates/collab/src/api/extensions.rs
+++ b/crates/collab/src/api/extensions.rs
@@ -53,9 +53,17 @@ async fn get_extensions(
let extensions = if let Some(extension_ids) = extension_ids {
app.db.get_extensions_by_ids(&extension_ids, None).await?
} else {
- app.db
+ let result = app
+ .db
.get_extensions(params.filter.as_deref(), params.max_schema_version, 500)
- .await?
+ .await?;
+
+ if let Some(query) = params.filter.as_deref() {
+ let count = result.len();
+ tracing::info!(query, count, "extension_search")
+ }
+
+ result
};
Ok(Json(GetExtensionsResponse { data: extensions }))