Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Halter <halter73@gmail.com>2022-05-21 04:33:42 +0300
committerGitHub <noreply@github.com>2022-05-21 04:33:42 +0300
commitb3b79b0b0ab9c25540464f69811bf9a3b7e5fe3f (patch)
tree324aa0f53a8e5d35868c6099cca4f8771b5eef0a
parent9ce55b01d752cb4dd9d8a3d1addd5301e95dbdaa (diff)
Update src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cshalter73/delete-old-comments
-rw-r--r--src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs b/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs
index 6495fa9c94..4c51043c9e 100644
--- a/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs
+++ b/src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs
@@ -328,6 +328,10 @@ internal sealed class HostingApplicationDiagnostics
{
if (ActivityContext.TryParse(requestId, traceState, isRemote: true, out ActivityContext context))
{
+ // The requestId used the W3C ID format. Unfortunately, the ActivitySource.CreateActivity overload that
+ // takes a string parentId never sets HasRemoteParent to true. We work around that by calling the
+ // ActivityContext overload instead which sets HasRemoteParent to parentContext.IsRemote.
+ // https://github.com/dotnet/aspnetcore/pull/41568#discussion_r868733305
activity = _activitySource.CreateActivity(ActivityName, ActivityKind.Server, context);
}
else