Skip to content

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

Merged
merged 8 commits into from
Aug 22, 2025
Merged

Conversation

kc284
Copy link
Contributor

@kc284 kc284 commented Aug 19, 2025

The commit authored by Edwin is porting the changes from #5929.

Konstantina Chremmou added 2 commits August 20, 2025 14:14
…ct file (or the build switches in it are ignored).

Signed-off-by: Konstantina Chremmou <[email protected]>
Konstantina Chremmou and others added 4 commits August 20, 2025 15:28
…roperties instead of public fields.

Signed-off-by: Konstantina Chremmou <[email protected]>
Signed-off-by: Konstantina Chremmou <[email protected]>
@kc284 kc284 force-pushed the master branch 3 times, most recently from c7ee5e4 to 251f0af Compare August 20, 2025 15:35
…enterism and not always correct.

Signed-off-by: Konstantina Chremmou <[email protected]>
@kc284 kc284 marked this pull request as ready for review August 20, 2025 16:40
Copy link
Contributor

@edwintorok edwintorok left a 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);
Copy link
Contributor

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]>
@kc284
Copy link
Contributor Author

kc284 commented Aug 22, 2025

Sorry, I had to add one more commit because there has just occurred an issue with the PS 5.1 build.

@kc284 kc284 added this pull request to the merge queue Aug 22, 2025
Merged via the queue into xapi-project:master with commit a248a71 Aug 22, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants