Skip to content

Commit

Permalink
fix review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Jun 18, 2024
1 parent 3c933ad commit c61cc57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion opentelemetry-appender-tracing/src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ where
let mut log_record = self.logger.create_log_record();
log_record.set_severity_number(severity_of_level(meta.level()));
log_record.set_severity_text(meta.level().to_string().into());
log_record.set_target(meta.target().to_string());
log_record.set_target(meta.target());

let mut visitor = EventVisitor::new(&mut log_record);
visitor.visit_metadata(meta);
Expand Down
3 changes: 2 additions & 1 deletion opentelemetry-proto/src/transform/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub mod tonic {
let (library, target) = data;
InstrumentationScope {
name: target
.map(|t| t.to_string())
.unwrap_or_else(|| library.name.into_owned()),
version: library.version.map(Cow::into_owned).unwrap_or_default(),
attributes: Attributes::from(library.attributes).0,
Expand All @@ -80,7 +81,7 @@ pub mod tonic {
let (library, target) = data;
InstrumentationScope {
name: target
.map(|t| t.replace("::", "."))
.map(|t| t.to_string())
.unwrap_or_else(|| library.name.to_string()),
version: library
.version
Expand Down

0 comments on commit c61cc57

Please sign in to comment.