Skip to content

Commit

Permalink
Revert "qe: add json serialization span in binary engine (#4339)"
Browse files Browse the repository at this point in the history
This reverts commit fce8aba.
  • Loading branch information
aqrln authored Apr 10, 2024
1 parent 6144ce0 commit 2f7b510
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions query-engine/query-engine/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ async fn request_handler(cx: Arc<PrismaContext>, req: Request<Body>) -> Result<R
match serialized_body {
Ok(body) => {
let handler = RequestHandler::new(cx.executor(), cx.query_schema(), cx.engine_protocol());
let mut result = handler.handle(body, tx_id, traceparent).await;
let mut result = handler.handle(body, tx_id, traceparent).instrument(span).await;

if let telemetry::capturing::Capturer::Enabled(capturer) = &capture_config {
let telemetry = capturer.fetch_captures().await;
Expand All @@ -183,8 +183,7 @@ async fn request_handler(cx: Arc<PrismaContext>, req: Request<Body>) -> Result<R
}
}

let json_span = tracing::info_span!("prisma:engine:response_json_serialization", user_facing = true);
let res = json_span.in_scope(|| build_json_response(StatusCode::OK, &result));
let res = build_json_response(StatusCode::OK, &result);

Ok(res)
}
Expand All @@ -203,7 +202,7 @@ async fn request_handler(cx: Arc<PrismaContext>, req: Request<Body>) -> Result<R
}
};

work.instrument(span).await
work.await
}

/// Expose the GraphQL playground if enabled.
Expand Down

0 comments on commit 2f7b510

Please sign in to comment.