Page MenuHomePhabricator

Add Last-Modified to performance logging
Closed, ResolvedPublic

Description

In order to be able to tell when a thumbnail has been prerendered and is only being pulled from swift to varnish, we need to track this extra response header. Age and Date, which are also needed, are already logged.

Details

Related Gerrit Patches:
mediawiki/core : wmf/1.25wmf12Backport Last-Modified performance logging for Media Viewer
mediawiki/extensions/MultimediaViewer : wmf/1.25wmf12Log Last-Modified header in performance logger
mediawiki/extensions/MultimediaViewer : masterLog Last-Modified header in performance logger

Event Timeline

Gilles created this task.Dec 17 2014, 9:30 AM
Gilles claimed this task.
Gilles raised the priority of this task from to Medium.
Gilles updated the task description. (Show Details)
Gilles changed Security from none to None.
Gilles moved this task from Untriaged to Next up on the Multimedia board.
Gilles added subscribers: Gilles, Tgr.

Actually, as @Tgr pointed out, Varnish's X-Timestamp is the same as Last-Modified, and we're already logging that. Assuming that the clocks of varnish servers and eventlogging http (sql?) servers are in sync, "Date" should be the same as the "timestamp" column of the EL table. I'll run some SQL queries to see if that all holds true.

Actually timestamp != Date for one very obvious reason: the EL event will only be recorded after the image load, and will depend on latency. So we do need to log "Date". We don't really need Last-Modified since it should be identical to X-Timestamp, but I'll add it just in case.

Saving this for later: P163

Ah, it turns out that the "timestamp" column IS the Date header. So we only need Last-Modified.

Gilles renamed this task from Add Last-Modified and Date to performance logging to Add Last-Modified to performance logging.Dec 17 2014, 10:30 AM
Gilles updated the task description. (Show Details)

Change 180433 had a related patch set uploaded (by Gilles):
Log Last-Modified header in performance logger

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

Patch-For-Review

Gilles moved this task from Next up to Needs code review on the Multimedia board.Dec 17 2014, 10:32 AM
Tgr added a comment.Dec 17 2014, 6:47 PM

Ah, it turns out that the "timestamp" column IS the Date header. So we only need Last-Modified.

I think timestamp is added by Varnish when it receives the EL request, so it would equal the Date header of the EL request, not the Date header of the thumbnail request that's being logged?

Tgr added a comment.Dec 17 2014, 6:49 PM

Oh yeah we have a manual timestamp field, I remember now.

Tgr added a comment.Dec 17 2014, 6:53 PM

Last-Modified is a simple response header so there should not be any CORS issues with this.

Change 180433 merged by jenkins-bot:
Log Last-Modified header in performance logger

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

Change 180742 had a related patch set uploaded (by Gilles):
Log Last-Modified header in performance logger

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

Patch-For-Review

Change 180742 merged by jenkins-bot:
Log Last-Modified header in performance logger

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

Change 180743 had a related patch set uploaded (by Gilles):
Backport Last-Modified performance logging for Media Viewer

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

Patch-For-Review

Change 180743 merged by jenkins-bot:
Backport Last-Modified performance logging for Media Viewer

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

Gilles moved this task from Needs backport to Done on the Multimedia board.Dec 18 2014, 4:22 PM
Gilles moved this task from Done to Doing on the Multimedia board.
Gilles moved this task from Doing to Done on the Multimedia board.Jan 7 2015, 4:43 PM
Gilles closed this task as Resolved.Jan 8 2015, 5:32 AM