Skip to content

Commit

Permalink
Fix lints and re-format
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljharvey committed Oct 3, 2023
1 parent d9ef331 commit 0ae23a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust-connector-sdk/src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ pub fn make_span(request: &Request<Body>) -> Span {
});
span.set_parent(parent_context);

return span;
span
}

// Rough implementation of extracting deployment ID from URI. Regex might be better?
fn extract_deployment_id(uri: &Uri) -> &str {
let path = uri.path();
let mut parts = path.split('/').filter(|x| !x.is_empty());
let _ = parts.next().unwrap_or_default();
parts.next().unwrap_or_else(|| "unknown")
parts.next().unwrap_or("unknown")
}

// Custom function for adding information to request-level span that is only available at response time.
Expand Down

0 comments on commit 0ae23a7

Please sign in to comment.