We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9b47f2 commit 4bdbc33Copy full SHA for 4bdbc33
opentelemetry-otlp/examples/basic-otlp/src/main.rs
@@ -89,8 +89,12 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
89
// By binding the result to an unused variable, the lifetime of the variable
90
// matches the containing block, reporting traces and metrics during the whole
91
// execution.
92
- init_tracer()?;
93
- init_metrics()?;
+
+ 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());
98
99
// Initialize logs, which sets the global loggerprovider.
100
let logger_provider = init_logs().unwrap();
0 commit comments