Skip to content

Commit

Permalink
Replace println calls with log calls (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xd34d10cc authored Feb 1, 2024
1 parent ee49263 commit 7297b72
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions minitrace-datadog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ categories = ["development-tools::debugging"]
keywords = ["tracing", "span", "datadog", "jaeger", "opentelemetry"]

[dependencies]
log = "0.4"
minitrace = { version = "0.6.3", path = "../minitrace" }
reqwest = { version = "0.11", features = ["blocking"] }
rmp-serde = "1"
Expand Down
3 changes: 2 additions & 1 deletion minitrace-datadog/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ impl Reporter for DatadogReporter {
}

if let Err(err) = self.try_report(spans) {
eprintln!("report to datadog failed: {}", err);
log::error!("report to datadog failed: {}", err);
}
}
}

#[derive(Serialize)]
struct DatadogSpan<'a> {
name: &'a str,
Expand Down
2 changes: 1 addition & 1 deletion minitrace-jaeger/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl Reporter for JaegerReporter {
}

if let Err(err) = self.try_report(spans) {
eprintln!("report to jaeger failed: {}", err);
log::error!("report to jaeger failed: {}", err);
}
}
}
2 changes: 1 addition & 1 deletion minitrace-opentelemetry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl Reporter for OpenTelemetryReporter {
}

if let Err(err) = self.try_report(spans) {
eprintln!("report to opentelemetry failed: {}", err);
log::error!("report to opentelemetry failed: {}", err);
}
}
}
Expand Down

0 comments on commit 7297b72

Please sign in to comment.