Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat: even more search logging (#1732)
gbirman86966ca73d34
diff --git a/rust/cloud-storage/opensearch_client/src/search/unified.rs b/rust/cloud-storage/opensearch_client/src/search/unified.rsindex d3e8f2b322..090c08e48c 100644--- a/rust/cloud-storage/opensearch_client/src/search/unified.rs+++ b/rust/cloud-storage/opensearch_client/src/search/unified.rs@@ -483,11 +483,6 @@ pub(crate) async fn search_unified(.instrument(tracing::info_span!("opensearch_read_response_body")).await?;- tracing::info!(- response_body_bytes = bytes.len(),- "opensearch response size"- );-let result: DefaultSearchResponse<UnifiedSearchIndex> = {let _span = tracing::info_span!("opensearch_deserialize_response", body_size = bytes.len()).entered();@@ -499,6 +494,13 @@ pub(crate) async fn search_unified(})?};+ tracing::info!(+ response_body_bytes = bytes.len(),+ opensearch_took_ms = result.took,+ hit_count = result.hits.hits.len(),+ "opensearch response"+ );+let mut results: Vec<SearchHit> = result.hits.hits.into_iter().map(|h| h.into()).collect();let has_more = results.len() > args.page_size as usize;diff --git a/rust/cloud-storage/search_service/src/api/search/simple/simple_unified.rs b/rust/cloud-storage/search_service/src/api/search/simple/simple_unified.rsindex ae0f5eb59c..4a562a2056 100644--- a/rust/cloud-storage/search_service/src/api/search/simple/simple_unified.rs+++ b/rust/cloud-storage/search_service/src/api/search/simple/simple_unified.rs@@ -605,7 +605,12 @@ pub async fn handler(extract::Query(query_params): extract::Query<SearchPaginationParams>,extract::Json(req): extract::Json<UnifiedSearchRequest>,) -> Result<Json<SimpleSearchResponse>, SearchError> {- tracing::info!(user_id = user_context.user_id, "simple_unified_search");+ tracing::info!(+ user_id = user_context.user_id,+ terms = ?req.terms,+ search_on = ?req.search_on,+ "simple_unified_search"+ );let (results, _next_cursor) =perform_unified_search(&ctx, &user_context, query_params, req).await?;diff --git a/rust/cloud-storage/search_service/src/api/search/unified.rs b/rust/cloud-storage/search_service/src/api/search/unified.rsindex e1e318938f..12f0f7102d 100644--- a/rust/cloud-storage/search_service/src/api/search/unified.rs+++ b/rust/cloud-storage/search_service/src/api/search/unified.rs@@ -42,7 +42,12 @@ pub async fn handler(extract::Query(query_params): extract::Query<SearchPaginationParams>,extract::Json(req): extract::Json<UnifiedSearchRequest>,) -> Result<Json<UnifiedSearchResponse>, SearchError> {- tracing::info!(user_id = user_context.user_id, "unified_search");+ tracing::info!(+ user_id = user_context.user_id,+ terms = ?req.terms,+ search_on = ?req.search_on,+ "unified_search"+ );let (results, next_cursor) =perform_unified_search(&ctx, &user_context, query_params, req).await?;