[logging] Add render failure error into log (#6422)

This commit is contained in:
Grace Guo 2018-11-26 11:51:25 -08:00 committed by GitHub
parent 5ca8c0ba3c
commit 2489876bc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,14 @@ class Chart extends React.PureComponent {
const { actions, chartId } = this.props;
console.warn(error); // eslint-disable-line
actions.chartRenderingFailed(error.toString(), chartId, info ? info.componentStack : null);
Logger.append(LOG_ACTIONS_RENDER_CHART, {
slice_id: chartId,
has_err: true,
error_details: error.toString(),
start_offset: this.renderStartTime,
duration: Logger.getTimestamp() - this.renderStartTime,
});
}
prepareChartProps() {