Kurtiscwright commented on code in PR #2467:
URL: https://github.com/apache/iceberg-rust/pull/2467#discussion_r3327130655


##########
crates/iceberg/src/runtime/mod.rs:
##########
@@ -137,6 +159,17 @@ impl Runtime {
         }
     }
 
+    /// Attach a [`RuntimeTracer`] to both IO and CPU handles.
+    ///
+    /// Every future or blocking closure spawned through this runtime will be
+    /// passed through the tracer, allowing callers to inject instrumentation
+    /// (e.g. tracing spans, metrics) without modifying spawn sites.
+    pub fn with_tracer(mut self, tracer: Arc<dyn RuntimeTracer>) -> Self {
+        self.io.tracer = Some(tracer.clone());
+        self.cpu.tracer = Some(tracer);

Review Comment:
   Sounds good, I think I was over-complicating the question of why the CPU 
tracer takes direct ownership of the tracer memory while the io takes a copy. 
Thank you for responding!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to