1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-10 10:00:57 +09:00
Satori/docs/workflow/trimming
Eric Erhardt 632cdcab09
Trim more Http DiagnosticsHandler code (#39525)
Since the DiagnosticsHandler still gets instantiated in the HttpClientHandler, none of its overriden methods are getting trimmed. This leads to System.Diagnostics.DiagnosticListener still being preserved in a linked application.

The fix is to split DiagnosticsHandler.IsEnabled() into two methods:

* IsGloballyEnabled() - checks the AppContext switch, and is replaced by the linker by a feature swtich.
* IsEnabled() - which checks IsGloballyEnabled() and if there is an Activity or listener available.

This allows all but the IsEnabled and IsGloballyEnabled methods to get trimmed on DiagnosticsHandler.

Contributes to #38765
2020-07-21 08:59:52 -05:00
..
feature-switches.md Trim more Http DiagnosticsHandler code (#39525) 2020-07-21 08:59:52 -05:00