Set the custom tracer for both futures and blocking closures. This should be called once at startup. If called more than once, an `Err(JoinSetTracerError)` is returned. If not called at all, a no-op tracer that does nothing is used.
(
tracer: &'static dyn JoinSetTracer,
)
| 108 | /// `Err(JoinSetTracerError)` is returned. If not called at all, a no-op tracer that does nothing |
| 109 | /// is used. |
| 110 | pub fn set_join_set_tracer( |
| 111 | tracer: &'static dyn JoinSetTracer, |
| 112 | ) -> Result<(), JoinSetTracerError> { |
| 113 | GLOBAL_TRACER |
| 114 | .set(tracer) |
| 115 | .map_err(|_set_err| JoinSetTracerError::AlreadySet) |
| 116 | } |
| 117 | |
| 118 | /// Optionally instruments a future with custom tracing. |
| 119 | /// |
searching dependent graphs…