Skip to content

Commit 94ec159

Browse files
authored
Remove outdated comments HostingApplicationDiagnostics (#41778)
1 parent f36520b commit 94ec159

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,12 @@ private static void RecordRequestStartEventLog(HttpContext httpContext)
326326
Activity? activity = null;
327327
if (_activitySource.HasListeners())
328328
{
329-
if (ActivityContext.TryParse(requestId, traceState, true, out ActivityContext context))
329+
if (ActivityContext.TryParse(requestId, traceState, isRemote: true, out ActivityContext context))
330330
{
331-
// The requestId used W3C ID format. Unfortunately the ActivitySource.CreateActivity overload that
332-
// takes a string ID sets ActivityContext.IsRemote = false when it parses the string internally.
333-
// We work around that by using the ActivityContext ID overload and setting ActivityContext.IsRemote
334-
// to true after parsing it.
331+
// The requestId used the W3C ID format. Unfortunately, the ActivitySource.CreateActivity overload that
332+
// takes a string parentId never sets HasRemoteParent to true. We work around that by calling the
333+
// ActivityContext overload instead which sets HasRemoteParent to parentContext.IsRemote.
334+
// https://github.com/dotnet/aspnetcore/pull/41568#discussion_r868733305
335335
activity = _activitySource.CreateActivity(ActivityName, ActivityKind.Server, context);
336336
}
337337
else

0 commit comments

Comments
 (0)