Skip to content

Commit fbdb04c

Browse files
authored
Remove tracer name prefix from span name (#63)
Currently spans created with a tracer that has a name are augmented to have their names prepended with the tracer name. This is not then intended behaviour of a named tracer and needs to be changed. The expected behaviour is that the span name should not be modified from the one passed to the SDK.
1 parent a0e8f0b commit fbdb04c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/sdk/trace/tracer.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ impl api::Tracer for Tracer {
100100
/// trace includes a single root span, which is the shared ancestor of all other
101101
/// spans in the trace.
102102
fn start(&self, name: &str, parent_span: Option<api::SpanContext>) -> Self::Span {
103-
let name = format!("{}/{}", self.name, name);
104103
let config = self.provider.config();
105104
let span_id: u64 = rand::random();
106105

@@ -131,7 +130,7 @@ impl api::Tracer for Tracer {
131130
parent_span.as_ref(),
132131
trace_id,
133132
span_id,
134-
&name,
133+
name,
135134
&span_kind,
136135
&attribute_options,
137136
&link_options,
@@ -152,7 +151,7 @@ impl api::Tracer for Tracer {
152151
context: api::SpanContext::new(trace_id, span_id, trace_flags, false),
153152
parent_span_id,
154153
span_kind,
155-
name,
154+
name: name.to_string(),
156155
start_time: SystemTime::now(),
157156
end_time: SystemTime::now(),
158157
attributes,

0 commit comments

Comments
 (0)