insights: Fix dashboard ping, coalesce all values with 0 in case of nulls
Created by: CristinaBirkel
Closes https://github.com/sourcegraph/sourcegraph/issues/32404
Description
If there were no insights attached to dashboards, NULL
would be returned for these values and cause an error. This fix makes sure to return 0
instead.
Test plan
I ran this with locally with no insights attached to dashboards, and verified this result, and that no error is present in the logs.
"InsightsPerDashboard": {
"Avg": 0,
"Max": 0,
"Min": 0,
"Median": 0,
"StdDev": 0
},