mirror of https://github.com/apache/superset.git
[perf_logging] Add is_cached status when chart has error (#9009)
This commit is contained in:
parent
d3d8603620
commit
d0bc04fc93
|
@ -259,11 +259,12 @@ export function exploreJSON(
|
||||||
return dispatch(chartUpdateSucceeded(json, key));
|
return dispatch(chartUpdateSucceeded(json, key));
|
||||||
})
|
})
|
||||||
.catch(response => {
|
.catch(response => {
|
||||||
const appendErrorLog = errorDetails => {
|
const appendErrorLog = (errorDetails, isCached) => {
|
||||||
dispatch(
|
dispatch(
|
||||||
logEvent(LOG_ACTIONS_LOAD_CHART, {
|
logEvent(LOG_ACTIONS_LOAD_CHART, {
|
||||||
slice_id: key,
|
slice_id: key,
|
||||||
has_err: true,
|
has_err: true,
|
||||||
|
is_cached: isCached,
|
||||||
error_details: errorDetails,
|
error_details: errorDetails,
|
||||||
datasource: formData.datasource,
|
datasource: formData.datasource,
|
||||||
start_offset: logStart,
|
start_offset: logStart,
|
||||||
|
@ -283,7 +284,8 @@ export function exploreJSON(
|
||||||
return dispatch(chartUpdateStopped(key));
|
return dispatch(chartUpdateStopped(key));
|
||||||
}
|
}
|
||||||
return getClientErrorObject(response).then(parsedResponse => {
|
return getClientErrorObject(response).then(parsedResponse => {
|
||||||
appendErrorLog(parsedResponse.error);
|
// query is processed, but error out.
|
||||||
|
appendErrorLog(parsedResponse.error, parsedResponse.is_cached);
|
||||||
return dispatch(chartUpdateFailed(parsedResponse, key));
|
return dispatch(chartUpdateFailed(parsedResponse, key));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue