-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Allow Trace Samplers to Modify the Activity Trace State #65530
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/area-system-diagnostics-activity Issue DetailsFixes #63652
|
src/libraries/System.Diagnostics.DiagnosticSource/tests/ActivitySourceTests.cs
Show resolved
Hide resolved
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.
LGTM.
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.
LGTM : )
{ | ||
if (setTraceWithStringParent) | ||
{ | ||
activityOptions = activityOptions with { TraceState = traceStateValueWithStringParent }; |
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.
More of a design question... if I was a developer using an earlier version of the C# compiler, would I have any way to achieve the same result?
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.
No, to use this feature must use C# compiler version 10 or later. This is not the first feature we expose in the framework using this new syntax. System.Text.Json already using it a lot.
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.
I assume @reyang and @cijothomas are OK with this requirement? Effectively they will have to compile OpenTelemetry SDK with a compiler version >= 10.
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.
yes. OpenTelemetry SDK uses 10
src/libraries/System.Diagnostics.DiagnosticSource/tests/ActivitySourceTests.cs
Show resolved
Hide resolved
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.
LGTM
Fixes #63652