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.

Event Timeline

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.

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

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?

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

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 Done to Doing on the Multimedia board.