Skip to content

Commit d7a8158

Browse files
timmac-qmcperf2711
andauthored
Update Backtrace/Model/JsonData/BacktraceAttributes.cs
Co-authored-by: Sebastian Alex <sebapotok@gmail.com>
1 parent bbd4db3 commit d7a8158

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Backtrace/Model/JsonData/BacktraceAttributes.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,14 @@ private void SetProcessAttributes()
241241
{
242242
Attributes["process.age"] = totalProcessAge;
243243
}
244+
}
245+
catch (NotSupportedException)
246+
{
247+
Trace.TraceWarning($"Cannot retrieve process age - TotalProcessorTime is not supported");
248+
}
244249

250+
try
251+
{
245252
Attributes["cpu.process.count"] = Process.GetProcesses().Count();
246253

247254
//Resident memory usage.

0 commit comments

Comments
 (0)