Skip to content

Commit

Permalink
simplify trace check
Browse files Browse the repository at this point in the history
  • Loading branch information
garrensmith committed Sep 15, 2022
1 parent 53907ad commit 6f559dc
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions query-engine/connectors/sql-query-connector/src/sql_trace.rs
Expand Up @@ -47,13 +47,7 @@ macro_rules! sql_trace {
}

fn should_sample(traceparent: &str) -> bool {
let trace_info: Vec<&str> = traceparent.split('-').collect();

if trace_info.len() != 4 {
false
} else {
trace_info.last() == Some(&"01")
}
traceparent.split('-').count() == 4 && traceparent.ends_with("-01")
}

sql_trace!(Insert<'_>);
Expand Down

0 comments on commit 6f559dc

Please sign in to comment.