-
Notifications
You must be signed in to change notification settings - Fork 779
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
[ASP.NET Core] Do not reset baggage on request stop event #4274
[ASP.NET Core] Do not reset baggage on request stop event #4274
Conversation
var textMapPropagator = Propagators.DefaultTextMapPropagator; | ||
if (textMapPropagator is not TraceContextPropagator) | ||
{ | ||
Baggage.Current = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be done at SDK side instead? Could you run stress tests to confirm there are no leaks if we do not remove it at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did run stress test. Did not see any leaks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be done at SDK side instead?
Are you referring to OnEnd in SDK? I have not looked in to that but just thinking it will impact all activities as we need to first check the activity ending is ASP.NET Core one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Baggage should be independent of any activity, so why we need to check which activity is being stopped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only for ASP.NET Core activity. For other one's we do not do anything right now as well.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4274 +/- ##
==========================================
- Coverage 83.32% 83.30% -0.03%
==========================================
Files 314 314
Lines 12525 12522 -3
==========================================
- Hits 10437 10431 -6
- Misses 2088 2091 +3
|
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
public async Task BaggageClearedWhenActivityStopped() | ||
public async Task BaggageIsNotClearedWhenActivityStopped() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocking comment... but if the instrumentation had never had this behavior, then we likely would never had this test in the first place. Perhaps we just remove this test completely?
Co-authored-by: Alan West <[email protected]>
/easycla |
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
Fixes #2992
Follow up #4274 (comment)
Ran the stress test using bombardier tool command
bombardier-windows-amd64.exe -d 12h -r 50 --header="baggage: key=value" <url>
Monitored the process using
dotnet-counters monitor
for any memory leakssnippets after ~10 hr run
With this change
With main
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes