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

feat: Automatic Register XRay for all services #428

Merged
merged 6 commits into from
Sep 7, 2023

Conversation

amirkaws
Copy link
Contributor

@amirkaws amirkaws commented Sep 7, 2023

Issue number: #249

Summary

This PR adds a thin wrapper around AWSSDKHandler.RegisterXRayForAllServices() andAWSSDKHandler.RegisterXRay()

Changes

Adds two wrapper static methods to Tracing class.

User experience

User now can call following wrapper methods instead of sdk methods

  • Tracing.RegisterForAllServices() instead of AWSSDKHandler.RegisterXRayForAllServices();
  • Tracing.Register() instead of AWSSDKHandler.RegisterXRay()

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.

@auto-assign auto-assign bot requested review from hjgraca and sliedig September 7, 2023 11:52
@boring-cyborg boring-cyborg bot added area/tracing Core tracing utility documentation Improvements or additions to documentation labels Sep 7, 2023
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 7, 2023
@github-actions github-actions bot added the feature New features or minor changes label Sep 7, 2023
@sonarcloud
Copy link

sonarcloud bot commented Sep 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov-commenter
Copy link

codecov-commenter commented Sep 7, 2023

Codecov Report

Patch coverage: 14.28% and project coverage change: -0.12% ⚠️

Comparison is base (e241ca9) 72.66% compared to head (6d7a757) 72.54%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #428      +/-   ##
===========================================
- Coverage    72.66%   72.54%   -0.12%     
===========================================
  Files           82       82              
  Lines         3644     3650       +6     
===========================================
  Hits          2648     2648              
- Misses         996     1002       +6     
Flag Coverage Δ
unittests 72.54% <14.28%> (-0.12%) ⬇️

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

Files Changed Coverage Δ
...aries/src/AWS.Lambda.Powertools.Tracing/Tracing.cs 0.00% <0.00%> (ø)
...owertools.Tracing/Internal/TracingAspectHandler.cs 93.33% <100.00%> (ø)

... and 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Can you add a unit test for the two new methods?

@amirkaws amirkaws merged commit 01a8eec into aws-powertools:develop Sep 7, 2023
6 checks passed
@amirkaws amirkaws deleted the automatic-xray-register branch September 7, 2023 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tracing Core tracing utility documentation Improvements or additions to documentation feature New features or minor changes size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants