Skip to content

Commit

Permalink
Use default trace layer implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljharvey committed Sep 29, 2023
1 parent 4a17570 commit 44bdc72
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions rust-connector-sdk/src/default_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,6 @@ where
))
}

/// A [`MakeSpan`] that creates tracing spans using [OpenTelemetry's conventional field names][otel].
///
/// [otel]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md
#[derive(Clone, Copy, Debug)]
pub struct PropagateParentTraces;

Expand Down Expand Up @@ -389,10 +386,7 @@ where
// .route("/mutation", post(v2_compat::post_mutation::<C>))
// .route("/raw", post(v2_compat::post_raw::<C>))
.route("/explain", post(v2_compat::post_explain::<C>))
.layer(
TraceLayer::new_for_http()
.make_span_with(DefaultMakeSpan::default().level(Level::INFO)),
)
.layer(TraceLayer::new_for_http().make_span_with(PropagateParentTraces))
.layer(ValidateRequestHeaderLayer::custom(
move |request: &mut Request<Body>| {
let provided_service_token_secret = request
Expand Down

0 comments on commit 44bdc72

Please sign in to comment.