`ConnectionSetupDistributedTracing` is not trimmed when `EnableActivityPropagation=false`

Open
#117,545 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp

Research direction

Read HttpConnectionWaiter.cs at the linked line and ConnectionSetupDistributedTracing.cs at its linked lines, then compare their usages with the EnableActivityPropagation check. Confirm that disabling the feature allows the related diagnostics code to be trimmed, and resolve whether the change belongs in the .NET 10 timeframe or Future as discussed in the issue.

Written by the indexing model from the issue text.

Description

area-System.Net.Http size-reduction

https://github.com/dotnet/runtime/blob/35584ab5b36abeb8a99607f8a32fa9f6468325d9/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/HttpConnectionWaiter.cs#L37

The usages of this type should be beyond a check against the GlobalHttpSettings.DiagnosticsHandler.EnableActivityPropagation variable/feature switch which we overlooked this type in our review of #114326.

Since the type constructs a static ActivitySource, I assume this prevents trimming out System.Diagnostics stuff that would be trimmed otherwise.

Should this be fixed for .NET 10 @pavelsavara? Or should it go to Future given #114635 is also postponed?

https://github.com/dotnet/runtime/blob/35584ab5b36abeb8a99607f8a32fa9f6468325d9/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionPool/ConnectionSetupDistributedTracing.cs#L11-L15

Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/runtime

All issues in dotnet/runtime

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.