Page MenuHomePhabricator

Improve logging around saving/publishing of translations on CX
Open, In Progress, MediumPublic4 Estimated Story Points

Description

We've setup a new channel: ContentTranslation to Logstash.

We should update our code to log all errors related to publishing or saving drafts to this channel

In addition,

  • Update LPL team dashboard in Logstash to track errors from this channel.
  • Setup a process to review logs pro-actively rather than having users reporting errors.
  • Decide if we want to allow users to report errors by prefilling fields in Phabricator.
  • See if alerts can be setup. Some documentation that could be followed: https://www.mediawiki.org/wiki/Reading/Web/Team/Setting_up_alerts_with_grafana

Event Timeline

Change #1142626 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] CX: Wrap publish logic around try...catch

https://gerrit.wikimedia.org/r/1142626

Change #1142634 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] Check if node has isFocusListenerAttached method before calling

https://gerrit.wikimedia.org/r/1142634

abi_ changed the task status from Open to In Progress.May 6 2025, 4:56 PM

Change #1142626 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Wrap publish logic around try...catch

https://gerrit.wikimedia.org/r/1142626

Change #1142634 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Check if node has isFocusListenerAttached method before calling

https://gerrit.wikimedia.org/r/1142634

Change #1144525 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] CX Desktop Editor: Scroll to the infobar when displaying message

https://gerrit.wikimedia.org/r/1144525

Change #1144525 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX Desktop Editor: Scroll to the infobar when displaying message

https://gerrit.wikimedia.org/r/1144525

Change #1146000 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] Add Logstash logging on section/page publish API

https://gerrit.wikimedia.org/r/1146000

Change #1146632 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] Add try...catch around CX/SX save handler

https://gerrit.wikimedia.org/r/1146632

Change #1146000 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Add Logstash logging on section/page publish API

https://gerrit.wikimedia.org/r/1146000

Change #1146632 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Add try...catch around CX/SX save handler

https://gerrit.wikimedia.org/r/1146632

I'm noticing a lot of occurrences of Error when publishing section {targetTitle}, {apiException} with the apiException as,

  • ⧼abusefilter-warning-character⧽
  • captcha issues
  • The text you wanted to publish was blocked by our filter. The following domain is blocked from being added: pravda.com.ua

etc

I think all of these issues shouldn't be logged.

Change #1159925 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] Avoid logging ApiUsageException on section/page publish API

https://gerrit.wikimedia.org/r/1159925

Change #1159925 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Avoid logging ApiUsageException on section/page publish API

https://gerrit.wikimedia.org/r/1159925

I'm still noticing some logs about captcha validation failures. I don't think these are worth logging.

{
    "captcha": {
        "type": "image",
        "mime": "image\/png",
        "id": "1214963447161357499",
        "url": "\/w\/index.php?title=%E7%89%B9%E5%88%A5:%E7%94%BB%E5%83%8F%E8%AA%8D%E8%A8%BC\/image&wpCaptchaId=1214963447161357499"
    },
    "result": "Failure"
}

Change #1166837 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] Avoid logging captcha related errors during publish

https://gerrit.wikimedia.org/r/1166837

Change #1166837 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Avoid logging captcha related errors during publish

https://gerrit.wikimedia.org/r/1166837

Change #1168156 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] Fix: Avoid logging captcha related errors during SX publish

https://gerrit.wikimedia.org/r/1168156

Change #1168156 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Fix: Avoid logging captcha related errors during SX publish

https://gerrit.wikimedia.org/r/1168156