Fix NoMethodError when Stack Trace is empty

Adds :traces to hash even if traces are empty.

Fixes #7174

Fixes #7175
This commit is contained in:
Rob Bavey 2017-05-21 00:36:55 -04:00 committed by João Duarte
parent c3df20b7cf
commit 7537b62c8d

View file

@ -42,7 +42,7 @@ class HotThreadsReport
_hash["thread.stacktrace"].each do |trace|
traces << trace
end
thread[:traces] = traces unless traces.empty?
thread[:traces] = traces
hash[:threads] << thread
end
{ :hot_threads => hash }