Page MenuHomePhabricator

Keep a track of HTTP status codes from PhotoDNA
Closed, ResolvedPublic1 Estimated Story Points

Description

We currently only log HTTP status codes to logstash via the mediamoderation channel. We want to lower the level of the logging to info and debug, to avoid logstash spam. However, we still want to see the count of HTTP status codes returned by PhotoDNA.

Acceptance criteria
  • Send HTTP status codes returned by PhotoDNA to grafana for display
  • Make logs sent to logstash about the status of each scan debug and info level to avoid logstash spam

Event Timeline

Change 991315 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/MediaModeration@master] Log to statsd HTTP status codes and reduce logstash log levels

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

Dreamy_Jazz changed the point value for this task from 2 to 1.Jan 17 2024, 12:18 PM

Change 991555 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/MediaModeration@wmf/1.42.0-wmf.14] Log to statsd HTTP status codes and reduce logstash log levels

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

Change 991315 merged by jenkins-bot:

[mediawiki/extensions/MediaModeration@master] Log to statsd HTTP status codes and reduce logstash log levels

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

Change 991555 merged by jenkins-bot:

[mediawiki/extensions/MediaModeration@wmf/1.42.0-wmf.14] Log to statsd HTTP status codes and reduce logstash log levels

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

Mentioned in SAL (#wikimedia-operations) [2024-01-18T21:05:17Z] <dreamyjazz@deploy2002> Started scap: Backport for [[gerrit:991555|Log to statsd HTTP status codes and reduce logstash log levels (T355216)]]

Mentioned in SAL (#wikimedia-operations) [2024-01-18T21:08:24Z] <dreamyjazz@deploy2002> dreamyjazz: Backport for [[gerrit:991555|Log to statsd HTTP status codes and reduce logstash log levels (T355216)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-01-18T21:14:19Z] <dreamyjazz@deploy2002> Finished scap: Backport for [[gerrit:991555|Log to statsd HTTP status codes and reduce logstash log levels (T355216)]] (duration: 09m 00s)

QA for this ticket would have to be on production. Setting this up on a local wiki, beta or patch demo is likely not possible

To check this has worked on production, you would do the following steps:

  1. Open the Grafana dashboard
  2. Verify that after the 18th, no items with the name 'Error' appear in the graph named Request successes and errors and instead HTTP status codes 500 appear.
  3. If you have access to production logstash, open https://logstash.wikimedia.org/goto/c83f45f16f4cf9b80fb9427819d1ba68 and verify no events are present after the 18th. If you do not have access, then I have been able to verify that this step passed.
Djackson-ctr subscribed.

I have verified the new code has been implemented and is functioning and displaying as expected... Thank you for the QA Steps @Dreamy_Jazz.