-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offer @traced macro when macros gain function body replacement capabilities #125
Offer @traced macro when macros gain function body replacement capabilities #125
Comments
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 👍 |
extras
package
rdar://109247127 |
Since function body macros ship with Swift 6.0 (swiftlang/swift#73765) is this unblocked now? |
Additional info: Backed out the traced macro until we can figure out a policy about macros adoption in this package that would not hinder upgrades of the dependency for folks not even using the macro. |
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.The text was updated successfully, but these errors were encountered: