-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Reordered parameters to TransactionContext and SpanContext constructors #2696
Reordered parameters to TransactionContext and SpanContext constructors #2696
Conversation
…ctor having default properties
|
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.
Thanks for pulling all those together!
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.
didn't really look at the change, sorry but another nit on the changelog: this is a breaking change and ppl become afraid of taking them sometimes. It's helpful when we give folks a migration path that's clear to follow
…rs (#2696) * Replaced multiple TransactionContext constructors to a single constructor having default properties * Made most of the SpanContext constructor parameters optional
Consolidated multiple TransactionContext constructors into a single constructor with default values for most of the arguments... so all the convience of some overloads and all the power of others.
SDK Change Notes
Both the
TransactionContext
andSpanContext
classes now have default values for most of the values that can be passed to their constructors, which should mean you no longer need to provide unecessarynull
values etc. for arguments you don't care about.However in order to make this change, the order of parameters had to be changed so that the non-optional parameters come first in the constructor method signatures. If you're constructing instances of these classes in your own code (which is unlikely), you will need to adjust the order in which you pass parameters to these. See the PR changes for details.