You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Offer @traced macro when macros gain function body replacement capabilities #125
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.
changed the title [-]Macros for tracing a function — maybe in the `extras` package[/-][+]Offer @traced macro when macros gain function body replacement capabilities[/+]on May 26, 2023
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.
Activity
ktoso commentedon May 25, 2023
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 👍
[-]Macros for tracing a function — maybe in the `extras` package[/-][+]Offer @traced macro when macros gain function body replacement capabilities[/+]ktoso commentedon May 26, 2023
rdar://109247127
porglezomp commentedon Aug 22, 2024
Since function body macros ship with Swift 6.0 (swiftlang/swift#73765) is this unblocked now?
ktoso commentedon Nov 26, 2024
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.