-
Notifications
You must be signed in to change notification settings - Fork 5k
[draft] Trim ActivitySource via System.Diagnostics.ActivitySource.IsSupported feature #114636
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
base: main
Are you sure you want to change the base?
Conversation
...braries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs
Outdated
Show resolved
Hide resolved
Tagging subscribers to this area: @tommcdon |
- MSBuild property ActivitySourceSupport
src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionTelemetry.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Net.Security/src/System/Net/Security/NetSecurityTelemetry.cs
Outdated
Show resolved
Hide resolved
@@ -453,7 +451,14 @@ public IEnumerable<ActivityLink> Links | |||
/// <param name="operationName">Operation's name <see cref="OperationName"/></param> | |||
public Activity(string operationName) | |||
{ | |||
Source = s_defaultSource; | |||
if (!ActivitySource.IsSupported) |
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.
Why does the linker see the Activity as instantiated so that you have to do this manually?
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.
regex /e=".*System.Diagnostics.Activity::
on artifacts\bin\trimmingTests\projects\System.Net.Http.TrimmingTests\DiagnosticsAndMetricsTrimmedTest\win-x64\obj\Release\net10.0\win-x64\linked\linker-dependencies.xml
can find 34 member usages. Maybe this is not one of them and I was too defensive.
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 sent you the file in Teams
# Conflicts: # src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs
System.Diagnostics.ActivitySource.IsSupported
Contribute to #114635
On top of #114326