Skip to content
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

add full support for async-trait #161

Merged
merged 4 commits into from
Nov 30, 2023
Merged

add full support for async-trait #161

merged 4 commits into from
Nov 30, 2023

Conversation

mellowagain
Copy link
Member

@mellowagain mellowagain commented Nov 29, 2023

adds full support for async-trait by detecting whenever it is part of our input and then, instead of previously trying to parse it as a impl block, detect it, remove it accordingly and add it again after our instrumentation magic. this means that #[autometrics] needs to be defined before #[async_trait].

this fixes the duration issue and the result label issue together with async-trait

ext: fixes #155
int: fixes AM-140

Checklist

  • Changelog updated

@mellowagain mellowagain requested a review from a team November 29, 2023 16:32
@gagbo
Copy link
Member

gagbo commented Nov 30, 2023

Pending the compilation test changes it looks good to me!

@mellowagain mellowagain enabled auto-merge (squash) November 30, 2023 11:54
@mellowagain mellowagain merged commit 69e64f8 into main Nov 30, 2023
1 check passed
@mellowagain mellowagain deleted the ats branch November 30, 2023 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

#[autometrics] does not work well with #[async_trait]
2 participants