Skip to content

Commit 4bdbc33

Browse files
committed
Address PR comments
1 parent f9b47f2 commit 4bdbc33

File tree

1 file changed

+6
-2
lines changed
  • opentelemetry-otlp/examples/basic-otlp/src

1 file changed

+6
-2
lines changed

opentelemetry-otlp/examples/basic-otlp/src/main.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,12 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
8989
// By binding the result to an unused variable, the lifetime of the variable
9090
// matches the containing block, reporting traces and metrics during the whole
9191
// execution.
92-
init_tracer()?;
93-
init_metrics()?;
92+
93+
let result = init_tracer();
94+
assert!(result.is_ok(), "Init tracer failed with error: {:?}", result.err());
95+
96+
let result = init_metrics();
97+
assert!(result.is_ok(), "Init metrics failed with error: {:?}", result.err());
9498

9599
// Initialize logs, which sets the global loggerprovider.
96100
let logger_provider = init_logs().unwrap();

0 commit comments

Comments
 (0)