Skip to content
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

Breaking Change: Fix param name in ActivityContext..ctor (traceOptions -> traceFlags) #20502

Closed
1 of 22 tasks
jeffhandley opened this issue Sep 8, 2020 · 5 comments · Fixed by #20677
Closed
1 of 22 tasks
Assignees
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]

Comments

@jeffhandley
Copy link
Member

jeffhandley commented Sep 8, 2020

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 where traceOptions was used instead of traceFlags. 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.

public ActivityContext(System.Diagnostics.ActivityTraceId traceId, System.Diagnostics.ActivitySpanId spanId, System.Diagnostics.ActivityTraceFlags traceOptions, string? traceState = null)

New behavior

The updated constructor signature is the following, with the argument renamed to traceFlags.

public ActivityContext(System.Diagnostics.ActivityTraceId traceId, System.Diagnostics.ActivitySpanId spanId, System.Diagnostics.ActivityTraceFlags traceFlags, string? traceState = null, bool isRemote = false)

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

  • ASP.NET Core
  • C#
  • Code analysis
  • Core .NET libraries
  • Cryptography
  • Data
  • Debugger
  • Deployment
  • Globalization
  • Interop
  • JIT
  • LINQ
  • Managed Extensibility Framework (MEF)
  • MSBuild
  • Networking
  • Printing
  • Security
  • Serialization
  • Visual Basic
  • Windows Forms
  • Windows Presentation Foundation (WPF)
  • XML, XSLT

Affected APIs

ActivityContext(ActivityTraceId, ActivitySpanId, ActivityTraceFlags, String, Boolean)


Issue metadata

  • Issue type: breaking-change
@dotnet-bot dotnet-bot added ⌚ Not Triaged Not triaged breaking-change Indicates a .NET Core breaking change labels Sep 8, 2020
@gewarren gewarren self-assigned this Sep 8, 2020
@gewarren gewarren added doc-idea Indicates issues that are suggestions for new topics [org][type][category] 🏁 Release: .NET 5 Work items for the .NET 5 release and removed ⌚ Not Triaged Not triaged labels Sep 8, 2020
@gewarren
Copy link
Contributor

gewarren commented Sep 9, 2020

I'm not sure we need to document breaking changes from earlier preview versions. @PriyaPurkayastha ?

@jeffhandley
Copy link
Member Author

I thought we needed to document these since RC1 is Go-Live and these changes land in RC2.

@jeffhandley
Copy link
Member Author

I updated the description to call out that the fix goes in with RC2.

@PriyaPurkayastha
Copy link

Yes, any change in behavior from Go-Live release should be documented. In this case, breaking change is being introduced in .NET 5 RC2. So Version introduced should mention .NET 5 RC2 (not the version in which the API was introduced).

@jeffhandley
Copy link
Member Author

Thanks, @PriyaPurkayastha; I'll update that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants