In addition to the executor id, it would be nice to be able to correlate together requests made by the same user within a few seconds of each other, for example prefix requests that are misspelled and get corrected by the user
Talked to Max, we won't be able to do this quite as described. Setting up a session id for anonymous users will inject a cookie that will cause them to go around the varnish cache for the life of that cookie.
We could generate a token per user, but i worry that it might be more PII than we want. The token could be:
$id = md5( $user->getName() . $wgSecretKey );
or some such, I'm not entirely sure. I would prefer if the logs did not distinctly identify users, better would be some token with a short(< cpl hours) but reliable lifespan, but I don't think that will be possible. Also note that by using the name (=ip address for anons) this wouldn't be as reliable as the session id which is per-browser session.
Needs more thought.