Skip to content

Commit

Permalink
remove opentelemetry specific attribute parse
Browse files Browse the repository at this point in the history
  • Loading branch information
SidongYang committed Jan 15, 2024
1 parent ccaaec0 commit 01ee70a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tracing-opentelemetry/src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,12 @@ impl<'a> field::Visit for SpanAttributeVisitor<'a> {
/// [`Span`]: opentelemetry::trace::Span
fn record_str(&mut self, field: &field::Field, value: &str) {
match field.name() {
SPAN_NAME_FIELD => self.span_builder.name = value.to_string().into(),
SPAN_KIND_FIELD => self.span_builder.span_kind = str_to_span_kind(value),
SPAN_STATUS_CODE_FIELD => self.span_builder.status_code = str_to_status_code(value),
SPAN_STATUS_MESSAGE_FIELD => {
self.span_builder.status_message = Some(value.to_owned().into())
}
// SPAN_NAME_FIELD => self.span_builder.name = value.to_string().into(),
// SPAN_KIND_FIELD => self.span_builder.span_kind = str_to_span_kind(value),
// SPAN_STATUS_CODE_FIELD => self.span_builder.status_code = str_to_status_code(value),
// SPAN_STATUS_MESSAGE_FIELD => {
// self.span_builder.status_message = Some(value.to_owned().into())
// }
_ => self.record(KeyValue::new(field.name(), value.to_string())),
}
}
Expand Down

0 comments on commit 01ee70a

Please sign in to comment.