How tracing levels (inner vs outer) work in safely
masterWhen using :track-as, safely produces a hierarchy of events using the μ/trace library:
- Inner Events: One event is emitted for every attempt made to execute the inner block. These events include
:safely/attempt <N>(e.g.,:safely/attempt 0) and:safely/call-level :inner. If an attempt fails, the event includes:mulog/outcome :errorand the:exceptionobject. - Outer Event: One event is emitted for the entire
safelyblock execution. It includes:safely/call-level :outerand represents the final:mulog/outcome(e.g.,:okif any attempt succeeded).
This structure allows for distributed tracing where the outer call acts as a parent span to the individual attempt spans.
(safely
(some/function-call)
:track-as ::some/function-call)