You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
System.Diagnostics.DiagnosticSource: Activity with null operation name #77621
area-System.Diagnostics.Activitybreaking-changeIssue or PR that represents a breaking API or functional change over a previous release.needs-breaking-change-doc-createdBreaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet
Activity has a quirk in that its OperationName is not marked as nullable but its constructor allows it to be null. Chatted offline with the group CCed below and we agreed that it is a low-risk change to coalesce to string.Empty in this case.
Something like this:
publicActivity(string operationName){Source=s_defaultSource;// Allow data by default in the constructor to keep the compatibility.IsAllDataRequested=true;if(string.IsNullOrEmpty(operationName)){NotifyError(newArgumentException(SR.OperationNameInvalid));// <- Note: Does not throw.operationName=string.Empty;// <- New logic here.}OperationName=operationName;}
We consider setting to something like "<null>" but decided to use string.Empty because that is similar to what happens for Activity.Source.Name in the case of legacy instances.
needs-breaking-change-doc-createdBreaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet
area-System.Diagnostics.Activitybreaking-changeIssue or PR that represents a breaking API or functional change over a previous release.needs-breaking-change-doc-createdBreaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet
Activity