-
Notifications
You must be signed in to change notification settings - Fork 292
Support for .NET8 and Tracing information #6628
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
Conversation
…ct file (or the build switches in it are ignored). Signed-off-by: Konstantina Chremmou <[email protected]>
Signed-off-by: Konstantina Chremmou <[email protected]>
…roperties instead of public fields. Signed-off-by: Konstantina Chremmou <[email protected]>
Signed-off-by: Konstantina Chremmou <[email protected]>
Signed-off-by: Konstantina Chremmou <[email protected]>
…traceparent header. Signed-off-by: Edwin Török <[email protected]>
c7ee5e4
to
251f0af
Compare
…enterism and not always correct. Signed-off-by: Konstantina Chremmou <[email protected]>
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 porting over my changes from the other PR
var state = activity.TraceStateString; | ||
|
||
if (state?.Length > 0) | ||
requestMessage.Headers.Add("tracestate", state); |
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.
This is now in a .Net8 specific codepath, and HttpClient is used (not WebRequest), so maybe that one would already do most of this on its own?
Perhaps this could be done more simply if at this line:
httpClient = new HttpClient(httpHandler) { Timeout = TimeSpan.FromMilliseconds(Timeout) };
We add:
httpClient = new HttpClient(httpHandler) { Timeout = TimeSpan.FromMilliseconds(Timeout), ActivityHeadersPropagator = DistributedContextPropagator.CreateDefaultPropagator() };
Although for now we can also keep this code as is (which was tested with WebRequest), and simplify it later.
Signed-off-by: Konstantina Chremmou <[email protected]>
Sorry, I had to add one more commit because there has just occurred an issue with the PS 5.1 build. |
The commit authored by Edwin is porting the changes from #5929.