aws-powertools / powertools-lambda-dotnet

Powertools is a developer toolkit to implement Serverless best practices and increase developer velocity.
https://docs.powertools.aws.dev/lambda/dotnet/
MIT No Attribution
152 stars 24 forks source link

chore: Metrics - Add support for AOT #602

Closed hjgraca closed 2 months ago

hjgraca commented 2 months ago

Please provide the issue number

Issue number: #212

Summary

Metrics support for AOT

Changes

Add new MetricsSerializationContext.cs for AOT source generated serialization Remove dependency from UniversalWrapperAspect.cs and refactor Metric attribute/decorator .NET8 specific paths in code Refactor EMFValidationTests.cs no more mocks

User experience

Please share what the user experience looks like before and after this change

Checklist

Please leave checklist items unchecked if they do not apply to your change.

Is this a breaking change? **RFC issue number**: Checklist: * [ ] Migration process documented * [ ] Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 72.55%. Comparing base (cb11aff) to head (d666ab2).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #602 +/- ## =========================================== + Coverage 72.30% 72.55% +0.24% =========================================== Files 190 190 Lines 7905 7900 -5 Branches 851 850 -1 =========================================== + Hits 5716 5732 +16 + Misses 1893 1877 -16 + Partials 296 291 -5 ``` | [Flag](https://app.codecov.io/gh/aws-powertools/powertools-lambda-dotnet/pull/602/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-powertools) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/aws-powertools/powertools-lambda-dotnet/pull/602/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-powertools) | `72.55% <100.00%> (+0.24%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-powertools#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.