Skip to content

Conversation

@gagbo
Copy link
Contributor

@gagbo gagbo commented Jan 4, 2024

This fixes a small regression introduced when fixing instrumentation of async_trait code.

  • Add failing locus test
  • Let rust parse impl automatically

Checklist

  • Changelog updated

Gerry Agbobada added 3 commits January 4, 2024 11:41
Letting Rust parse the impl block allows us to keep the same TokenStream as input in the autometrics macro code, even when async_trait is involved.

Keeping the original TokenStream keeps the Span information in method/function bodies so error reporting in instrumented code is not absorbed in "#[autometrics]" span.

This also simplifies the parsing code a little bit.
@gagbo
Copy link
Contributor Author

gagbo commented Jan 4, 2024

So apparently it makes exemplars disappear :( (it was a precedence issue)

Copy link
Contributor

@mellowagain mellowagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! we should release a new release after this is merged and the other issue with the otel exporter http client is fixed

Gather all trybuild tests

Remove extra println used in failing tests
@gagbo gagbo merged commit bbba7c1 into main Jan 10, 2024
@gagbo gagbo deleted the report_error_locus branch January 10, 2024 08:30
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.

3 participants