Follow up to T392979: Review CX publishing dashboard on Grafana to check if its still accurate
Fix the issues identified after reviewing the Grafana CX publishing dashboard: https://grafana-rw.wikimedia.org/d/000000598/content-translation
| abi_ | |
| Jul 27 2025, 9:20 AM |
| F66733404: image.png | |
| Oct 6 2025, 9:26 AM |
| F66733291: image.png | |
| Oct 6 2025, 8:22 AM |
Follow up to T392979: Review CX publishing dashboard on Grafana to check if its still accurate
Fix the issues identified after reviewing the Grafana CX publishing dashboard: https://grafana-rw.wikimedia.org/d/000000598/content-translation
For now i still can't find a match for the publish fail log in both logstash and grafana, probably i miss something
from the publish fail method, in some cases the error is from the captcha, we don't log an error event, it is possible that we track the publish fail in grafana but don't log the captcha errors
mw.cx.TargetArticle.prototype.publishFail = function ( errorCode, messageOrFailObjOrData, data, jqXHR ) {
// ...
// Event logging
mw.hook( 'mw.cx.translation.publish.error' ).fire(
this.sourceLanguage,
this.targetLanguage,
this.sourceTitle,
this.getTargetTitle(),
data
);
// ...
const editResult = data.edit;
// Handle captcha
// Captcha "errors" usually aren't errors. We simply don't know about them ahead of time,
// so we save once, then (if required) we get an error with a captcha back and try again after
// the user solved the captcha.
if ( editResult && editResult.captcha && (
editResult.captcha.type === 'image' ||
editResult.captcha.type === 'simple' ||
editResult.captcha.type === 'math' ||
editResult.captcha.type === 'question'
) ) {
this.loadCaptchaDialog().then( this.showErrorCaptcha.bind( this, editResult ) );
return;
}
// ...
};Change #1189437 had a related patch set uploaded (by Huei Tan; author: Huei Tan):
[mediawiki/extensions/ContentTranslation@master] CX: Reorder the event track for the Catcha "errors"
Change #1189437 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX: Do not log captcha errors as translation publish errors
Question, here's the code
// Event logging
mw.hook( 'mw.cx.translation.publish.error' ).fire(
this.sourceLanguage,
this.targetLanguage,
this.sourceTitle,
this.getTargetTitle(),
data
);
const editError = data.error;
if ( editError ) {
this.handleEditError( editError );
return;
}
// Handle (other) unknown and/or unrecoverable errors
this.showErrorUnknown( editResult, data, jqXHR );Should we move the event logging to only "unknown error"? the handleEditError is the known error like blacklist/abusefilter/invalid title/bad token/etc
Change #1191658 had a related patch set uploaded (by Huei Tan; author: Huei Tan):
[mediawiki/extensions/ContentTranslation@master] Send event log for only unknown publish failure error
Change #1191658 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] CX: Log only unknown publish failures
the number of publish failed event tracking number close to zero, this is what we expected.