Skip to content

Commit

Permalink
Partially revert changes to move them to #4336
Browse files Browse the repository at this point in the history
  • Loading branch information
aqrln committed Apr 9, 2024
1 parent 81129cf commit d747472
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions query-engine/query-engine/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -116,8 +116,13 @@ async fn request_handler(cx: Arc<PrismaContext>, req: Request<Body>) -> Result<R
let tx_id = transaction_id(headers);
let tracing_cx = get_parent_span_context(headers);

let span = info_span!("prisma:engine", user_facing = true);
span.set_parent(tracing_cx);
let span = if tx_id.is_none() {
let span = info_span!("prisma:engine", user_facing = true);
span.set_parent(tracing_cx);
span
} else {
Span::none()
};

let mut traceparent = traceparent(headers);
let mut trace_id = get_trace_id_from_traceparent(traceparent.as_deref());
Expand Down

0 comments on commit d747472

Please sign in to comment.