Skip to content

Commit 65a4f71

Browse files
[release/5.0] Fix Activity Start Time Precision (#45176)
Co-authored-by: Tarek Mahmoud Sayed <tarekms@microsoft.com>
1 parent ce2b755 commit 65a4f71

File tree

1 file changed

+1
-1
lines changed
  • src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics

1 file changed

+1
-1
lines changed

src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ internal static Activity CreateAndStart(ActivitySource source, string name, Acti
10171017
}
10181018
}
10191019

1020-
activity.StartTimeUtc = startTime == default ? DateTime.UtcNow : startTime.UtcDateTime;
1020+
activity.StartTimeUtc = startTime == default ? GetUtcNow() : startTime.UtcDateTime;
10211021

10221022
activity.IsAllDataRequested = request == ActivitySamplingResult.AllData || request == ActivitySamplingResult.AllDataAndRecorded;
10231023

0 commit comments

Comments
 (0)