Skip to content

feat(tracing): add Subsegment wrapper to prevent exposing Amazon.XRayRecorder.Core.Internal #950

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

JonkaSusaki
Copy link

Issue number: #603

Summary

Changes

This PR creates a wrapper to prevent exposing internal lib Amazon.XRayRecorder.

  • Created libraries/src/AWS.Lambda.Powertools.Tracing/Internal/TracingSubsegment.cs to place the wrapper;
  • Changed libraries/src/AWS.Lambda.Powertools.Tracing/Tracing.cs to include the wrapper;

User experience

Before the changes, users had to include the reference to Amazon.XRay.Recorder.Core.Internal.Entities to use the Subsegment class. Now, the TracingSubsegment was created and users can now import them using the AWS.Lambda.Powertools.Tracing.Internal reference.

Checklist

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

Is this a breaking change?

NO

Acknowledgment

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

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 4, 2025
@boring-cyborg boring-cyborg bot added the area/tracing Core tracing utility label Aug 4, 2025
Copy link

boring-cyborg bot commented Aug 4, 2025

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #dotnet channel on our Powertools for AWS Lambda Discord: Invite link

@JonkaSusaki
Copy link
Author

Hey, @hjgraca! I tried implementing it this way.

Please, tell me your thoughts! If there's anything you think might need changes or you believe another approach is better, let me know!

Copy link

sonarqubecloud bot commented Aug 4, 2025

@leandrodamascena
Copy link
Contributor

Hi @JonkaSusaki, thank you so much for working on this PR! We will review this PR as soon as possible and provide feedback.

@github-actions github-actions bot added the feature New features or minor changes label Aug 4, 2025
Copy link

codecov bot commented Aug 4, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.39%. Comparing base (dd6d208) to head (2c30fbb).
⚠️ Report is 17 commits behind head on develop.

Files with missing lines Patch % Lines
...a.Powertools.Tracing/Internal/TracingSubsegment.cs 0.00% 1 Missing ⚠️
...aries/src/AWS.Lambda.Powertools.Tracing/Tracing.cs 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #950      +/-   ##
===========================================
- Coverage    77.39%   77.39%   -0.01%     
===========================================
  Files          271      272       +1     
  Lines        10874    10876       +2     
  Branches      1282     1282              
===========================================
+ Hits          8416     8417       +1     
- Misses        2041     2042       +1     
  Partials       417      417              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tracing Core tracing utility 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.

Maintenance: Bring Amazon.XRay.Recorder.Core.Internal.Entities into PT Tracing
2 participants