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

docs: ASP.NET Core WebAPI example(s) #287

Merged
merged 18 commits into from
Jun 23, 2023

Conversation

swimming-potato
Copy link
Contributor

Issue number: #220

Summary

Changes

Introduce an example for ASP.Net WebAPI deployed on AWS Lambda.

User experience

This is a change in documentation. A section ServerlessAPi has been added to the examples. The section demonstrates to AWS Lambda Powertools users: how to leverage logging, metrics and tracing provided by AWS Lambda Powertools in the WebAPI hosted by Kestrel. It contains the code and README.md file to walkthrough the changes.

Checklist

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

Is this a breaking change? No **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.

@auto-assign auto-assign bot requested a review from amirkaws June 5, 2023 12:25
@hjgraca hjgraca changed the title Docs: ASP.NET Core WebAPI example(s) docs: ASP.NET Core WebAPI example(s) Jun 5, 2023
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jun 5, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jun 5, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (dba5e90) 69.09% compared to head (29bda6b) 69.11%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #287      +/-   ##
===========================================
+ Coverage    69.09%   69.11%   +0.01%     
===========================================
  Files           79       79              
  Lines         3433     3448      +15     
===========================================
+ Hits          2372     2383      +11     
- Misses        1061     1065       +4     
Flag Coverage Δ
unittests 69.11% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...aries/src/AWS.Lambda.Powertools.Metrics/Metrics.cs 85.07% <100.00%> (+0.69%) ⬆️
...rc/AWS.Lambda.Powertools.Metrics/Model/Metadata.cs 98.03% <100.00%> (+0.12%) ⬆️
...Lambda.Powertools.Metrics/Model/MetricDirective.cs 86.04% <100.00%> (+0.50%) ⬆️
....Lambda.Powertools.Metrics/Model/MetricsContext.cs 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hjgraca hjgraca linked an issue Jun 5, 2023 that may be closed by this pull request
1 task
@hjgraca hjgraca self-assigned this Jun 10, 2023
@amirkaws amirkaws added the do-not-merge PRs that are blocked for varying reasons label Jun 12, 2023
@amirkaws
Copy link
Contributor

amirkaws commented Jun 12, 2023

Unit test is breaking because the FunctionVersion is null

2023-06-12_08-37-24

to solve that we can set the FunctionVersion

2023-06-12_15-00-16

Amazon Copyright comments are missing from files

2023-06-12_14-58-15

@swimming-potato
Copy link
Contributor Author

HI @amirkaws I did address your comment:) please check the PR.

@amirkaws
Copy link
Contributor

Hi @swimming-potato, thank you a lot for that. I think we are still missing copyright comments, we should add Amazon copyright comment on top of each .cs file.

2023-06-12_14-58-15

The other thing I believe we should add is a solution file in the example root folder to include both projects juts to be consistent with the. other examples. here is an example for logging https://github.com/aws-powertools/powertools-lambda-dotnet/blob/develop/examples/Logging/PowertoolsLoggingExample.sln

@hjgraca hjgraca requested a review from a team as a code owner June 20, 2023 15:45
Copy link
Contributor

Choose a reason for hiding this comment

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

Please rename the solution to PowertoolsServerlessApiExample

Copy link
Contributor

@hjgraca hjgraca 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. Small solution name change

@hjgraca hjgraca removed the do-not-merge PRs that are blocked for varying reasons label Jun 21, 2023
Copy link
Contributor

@amirkaws amirkaws left a comment

Choose a reason for hiding this comment

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

LGTM

@hjgraca
Copy link
Contributor

hjgraca commented Jun 23, 2023

Thank you for a great work @swimming-potato !

@hjgraca hjgraca merged commit 6a46c4e into aws-powertools:develop Jun 23, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 23, 2023

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: ASP.NET Core WebAPI example(s)
4 participants