Breaking Change: Fix param name in ActivityContext..ctor (traceOptions -> traceFlags) #20502
Closed
1 of 22 tasks
Labels
breaking-change
Indicates a .NET Core breaking change
🏁 Release: .NET 5
Work items for the .NET 5 release
doc-idea
Indicates issues that are suggestions for new topics [org][type][category]
Fix param name in ActivityContext..ctor (traceOptions -> traceFlags)
The
ActivityContext
API was added earlier in .NET 5.0 Preview 4, but there was a mistake in the constructor's argument name wheretraceOptions
was used instead oftraceFlags
. The implementation is correct but the reference assembly was wrong. dotnet/runtime#41843 fixed the argument name and this fix will ship with .NET 5.0 RC2.Version introduced
.NET 5.0 RC2
Old behavior
The previous constructor signature was the following, with an argument named
traceOptions
.New behavior
The updated constructor signature is the following, with the argument renamed to
traceFlags
.Reason for change
This corrects a mistake in the argument name and will improve the API, avoiding confusion by users.
Recommended action
If the argument was being used as a named argument, update calling code to correct the argument name to match the renamed
traceFlags
name.Category
Affected APIs
ActivityContext(ActivityTraceId, ActivitySpanId, ActivityTraceFlags, String, Boolean)
Issue metadata
The text was updated successfully, but these errors were encountered: