From 6a4c193d791a97cc2c348b73eaf271bc21114fd6 Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Sat, 7 Oct 2023 01:01:21 +0200 Subject: [PATCH 1/2] qe: add json seriaization span in binary engine The equivalent of https://github.com/prisma/prisma-engines/pull/4154 and https://github.com/prisma/prisma-engines/pull/4336 for the binary engine. Closes: https://github.com/prisma/prisma/issues/21405 --- query-engine/query-engine/src/server/mod.rs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/query-engine/query-engine/src/server/mod.rs b/query-engine/query-engine/src/server/mod.rs index 75543dc7ee58..4a708065335b 100644 --- a/query-engine/query-engine/src/server/mod.rs +++ b/query-engine/query-engine/src/server/mod.rs @@ -15,7 +15,7 @@ use std::collections::HashMap; use std::net::SocketAddr; use std::sync::Arc; use std::time::Instant; -use tracing::{field, Instrument, Span}; +use tracing::{field, Instrument}; use tracing_opentelemetry::OpenTelemetrySpanExt; /// Starts up the graphql query engine server @@ -116,13 +116,8 @@ async fn request_handler(cx: Arc, req: Request) -> Result, req: Request) -> Result { let handler = RequestHandler::new(cx.executor(), cx.query_schema(), cx.engine_protocol()); - let mut result = handler.handle(body, tx_id, traceparent).instrument(span).await; + let mut result = handler.handle(body, tx_id, traceparent).await; if let telemetry::capturing::Capturer::Enabled(capturer) = &capture_config { let telemetry = capturer.fetch_captures().await; @@ -183,7 +178,8 @@ async fn request_handler(cx: Arc, req: Request) -> Result, req: Request) -> Result Date: Tue, 9 Apr 2024 23:45:20 +0200 Subject: [PATCH 2/2] Partially revert changes to move them to #4336 --- query-engine/query-engine/src/server/mod.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/query-engine/query-engine/src/server/mod.rs b/query-engine/query-engine/src/server/mod.rs index 2cde87897ce2..a63504cc7663 100644 --- a/query-engine/query-engine/src/server/mod.rs +++ b/query-engine/query-engine/src/server/mod.rs @@ -15,7 +15,7 @@ use std::collections::HashMap; use std::net::SocketAddr; use std::sync::Arc; use std::time::Instant; -use tracing::{field, Instrument}; +use tracing::{field, Instrument, Span}; use tracing_opentelemetry::OpenTelemetrySpanExt; /// Starts up the graphql query engine server @@ -116,8 +116,13 @@ async fn request_handler(cx: Arc, req: Request) -> Result