Open stevapple opened 1 year ago
Yes, this is planned but we're missing macro functionality to pull it off.
We need "function body macros" -- once those ship we'll ship such macro in this library 👍
rdar://109247127
Since function body macros ship with Swift 6.0 (https://github.com/swiftlang/swift/pull/73765) is this unblocked now?
Typically we trace at function level by wrapping the whole implementation in a span, as demonstrated by the sample.
It makes me think if we can have an
@Traced
macro attached to functions, which handles the span automatically for users. Eventually such macro should be configurable (explicit tracer, span name, extracting context from parameters, etc.), but AFAIK Swift macros seem not having such level of expressiveness yet.