Skip to content

Commit 4ab0eaf

Browse files
authored
Make span name without query string (#1013)
Query strings shouldn't be included in span names, as this prevents tracing consumers from properly aggregating spans, etc. This change modifies span names to only include URI paths. Signed-off-by: aatarasoff <[email protected]>
1 parent 3d02866 commit 4ab0eaf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

linkerd/trace-context/src/service.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,7 @@ where
9696
let start = SystemTime::now();
9797
let req_labels = Self::request_labels(&req);
9898
let mut sink = self.sink.clone();
99-
let span_name = req
100-
.uri()
101-
.path_and_query()
102-
.map(|pq| pq.as_str().to_owned())
103-
.unwrap_or_default();
99+
let span_name = req.uri().path().to_owned();
104100
return Either::Right(Box::pin(self.inner.call(req).map_ok(move |rsp| {
105101
// Emit the completed span with the response metadata.
106102
let span = Span {

0 commit comments

Comments
 (0)