Skip to content

Commit

Permalink
Add ActivitySource support to DiagnosticsHandler (#54437)
Browse files Browse the repository at this point in the history
* Add ActivitySource support to DiagnosticsHandler

* Use ActivitySource as another enabled condition

* Make IsGloballyEnabled a property

* Simplify enabled check

* Revert using the exception filter

* Update HTTP ILLink.Substitutions.xml
  • Loading branch information
MihaZupan authored Jun 24, 2021
1 parent 1d84e01 commit c88da29
Show file tree
Hide file tree
Showing 6 changed files with 238 additions and 252 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<linker>
<assembly fullname="System.Net.Http">
<type fullname="System.Net.Http.DiagnosticsHandler">
<method signature="System.Boolean IsGloballyEnabled()" body="stub" value="false" feature="System.Net.Http.EnableActivityPropagation" featurevalue="false" />
<method signature="System.Boolean get_IsGloballyEnabled()" body="stub" value="false" feature="System.Net.Http.EnableActivityPropagation" featurevalue="false" />
</type>
<type fullname="System.Net.Http.HttpClient">
<method signature="System.Boolean IsNativeHandlerEnabled()" body="stub" value="true" feature="System.Net.Http.UseNativeHttpHandler" featurevalue="true" />
Expand Down
3 changes: 1 addition & 2 deletions src/libraries/System.Net.Http/src/System.Net.Http.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<WindowsRID>win</WindowsRID>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down Expand Up @@ -494,7 +494,6 @@
<!-- Common -->
<ItemGroup>
<Compile Include="System\Net\Http\DiagnosticsHandler.cs" />
<Compile Include="System\Net\Http\DiagnosticsHandlerLoggingStrings.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\SocketsHttpPlaintextStreamFilterContext.cs" />
<Compile Include="$(CommonPath)System\Threading\Tasks\TaskCompletionSourceWithCancellation.cs"
Link="Common\System\Threading\Tasks\TaskCompletionSourceWithCancellation.cs" />
Expand Down
Loading

0 comments on commit c88da29

Please sign in to comment.