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
[Breaking change]: Change the Activity operation name when the Activity is created with null value #32117
Creating an Activity object using null operation name is currently allowed but it has an undesired effect on the backend trace collectors. Usually trace collectors assume non-value operation names. The breaking change here is when creating the Activity object using null operation name, the operation name will use empty string "" instead of the null.
area: System.Diagnostics
Version
.NET 8 (other)
Previous behavior
Creating an Activity object using null operation name was storing the operation name inside the activity as null.
newActivity(operationName:null).OperationName// will have a null value
New behavior
Creating an Activity object using null operation name will convert the operation name to empty string
newActivity(operationName:null).OperationName// will have an empty string value
Type of breaking change
Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load/execute or different run-time behavior.
Source incompatible: Source code may encounter a breaking change in behavior when targeting the new runtime/component/SDK, such as compile errors or different run-time behavior.
Reason for change
Having null operation name inside the Activity object causes the trace collectors to special case it. Otherwise, it can run into crashes.
Recommended action
This is very unlikely to break as using null when creating Activity object is rare. If anyone for any reason was depending on null value will need to adjust the code to either not using null or expect getting empty string operation name when using null.
Feature area
Other (please put exact area in description textbox)
Activity