From e18b114b414a080ff12d2d4d2082371d51d7a92e Mon Sep 17 00:00:00 2001 From: mgiroux Date: Sun, 22 Oct 2023 09:45:01 -0400 Subject: [PATCH] use const_new to avoid creating a trace in tokio mutex --- apollo-router/src/services/layers/query_analysis.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apollo-router/src/services/layers/query_analysis.rs b/apollo-router/src/services/layers/query_analysis.rs index 8a23afc163..e3fe8f5c07 100644 --- a/apollo-router/src/services/layers/query_analysis.rs +++ b/apollo-router/src/services/layers/query_analysis.rs @@ -103,7 +103,7 @@ impl QueryAnalysisLayer { let span = tracing::info_span!("parse_query", "otel.kind" = "INTERNAL"); let (compiler, file_id) = span.in_scope(|| self.make_compiler(&query)); - let compiler = Arc::new(Mutex::new(compiler)); + let compiler = Arc::new(Mutex::const_new(compiler)); let context = Context::new(); let operation_name = compiler