Page MenuHomePhabricator

Add PHP error logging to Sentry extension
Closed, ResolvedPublic

Description

Extension:Sentry should log PHP errors just like it does JS errors. raven-php can be used to communicate with Sentry. (In the future, when MediaWiki is fully PSR-3-compatible and uses Monolog, RavenHandler can be used instead.)


See also: T85239

Related Objects

Event Timeline

Tgr created this task.Dec 23 2014, 12:44 AM
Tgr raised the priority of this task from to Needs Triage.
Tgr updated the task description. (Show Details)
Tgr added a project: Sentry.
Tgr added a subscriber: Tgr.

Change 183183 had a related patch set uploaded (by Gergő Tisza):
Change $wgSentryDsn to $wgSentryPublicDsn

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

Patch-For-Review

Change 183183 abandoned by Gergő Tisza:
Change $wgSentryDsn to $wgSentryPublicDsn

Reason:
Abandoning, it is better DX to just use the normal DSN and generate the public one from it by dropping the private part.

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

Change 183195 had a related patch set uploaded (by Gergő Tisza):
Derive the public DSN from the normal one

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

Patch-For-Review

Change 183195 merged by jenkins-bot:
Derive the public DSN from the normal one

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

Tgr updated the task description. (Show Details)May 24 2015, 8:29 AM
Tgr assigned this task to Edlira.May 24 2015, 8:33 AM

Change 213469 had a related patch set uploaded (by Edlira):
Add PHP error logging to Sentry extension

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

Change 213527 had a related patch set uploaded (by Gergő Tisza):
Fix Sentry DSN whitespace issues

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

Change 213469 merged by jenkins-bot:
Add PHP error logging to Sentry extension

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

Tgr added a comment.May 25 2015, 2:58 PM

Screenshots for the demo:

Tgr updated the task description. (Show Details)May 25 2015, 7:01 PM

Change 213757 had a related patch set uploaded (by Gergő Tisza):
Improve PHP error logging

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

Change 213527 merged by jenkins-bot:
Fix Sentry DSN whitespace issues

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

Change 215606 had a related patch set uploaded (by Hashar):
Revert "Add PHP error logging to Sentry extension"

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

Change 215606 merged by Hashar:
Revert "Add PHP error logging to Sentry extension"

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

hashar added a subscriber: hashar.Jun 3 2015, 12:11 PM

I had to revert the Sentry patch that comes with raven/raven. That lib is not in mediawiki/vendor and that broke the beta cluster ( T101252 ).

You would need to:

  • write a test to ensure Raven_Client() can actually be used
  • repropose the patch

At this point it will fail. You then want to add raven/raven in mediawiki/vendor and once merged the proposed change to Sentry will be able to land.

Tgr added a comment.EditedJun 3 2015, 4:38 PM

@hashar sorry about that :( raven-php is not intended to be used on WMF servers, but I forgot to set the flag that would disable it.

Change 215650 had a related patch set uploaded (by Gergő Tisza):
Disable PHP error logging in the Sentry extension

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

hashar added a comment.Jun 3 2015, 8:13 PM
In T85188#1334289, @Tgr wrote:

@hashar sorry about that :( raven-php is not intended to be used on WMF servers, but I forgot to set the flag that would disable it.

No worries :-)

Change 215650 merged by jenkins-bot:
Disable PHP error logging in the Sentry extension

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

Change 216753 had a related patch set uploaded (by Gergő Tisza):
Re-apply "Add PHP error logging to Sentry extension"

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

Change 216753 merged by jenkins-bot:
Re-apply "Add PHP error logging to Sentry extension"

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

Change 213757 merged by jenkins-bot:
Improve PHP error logging

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

Change 223510 had a related patch set uploaded (by Gergő Tisza):
Re-apply "Add PHP error logging to Sentry extension"

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

Change 223510 merged by jenkins-bot:
Re-apply "Add PHP error logging to Sentry extension"

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

Change 223515 had a related patch set uploaded (by Gergő Tisza):
Improve PHP error logging

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

Change 223515 merged by jenkins-bot:
Improve PHP error logging

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

Tgr closed this task as Resolved.Jul 16 2015, 5:12 PM