Page MenuHomePhabricator

Ensure MediaWiki sets the X-Request-Id header on linkrecommendation service requests, and mwaddlink includes it in its logs
Closed, InvalidPublic

Description

As the task title says, and as noted in T274195#6813241. We need to update ServiceLinkRecommendationProvider to add the request ID and then make sure mwaddlink uses that in its logging.

Event Timeline

X-Request-Id is set on outgoing MediaWiki requests automatically since rMW9fd7fe0d3cae: MWHttpRequest: Include the request ID in outgoing HTTP requests. We could set X-Forwarded-For and X-Original-User-Agent maybe, if that's useful for throttling in Envoy; that's done via MwHttpRequest::setOriginalRequest.

X-Request-Id is set on outgoing MediaWiki requests automatically since rMW9fd7fe0d3cae: MWHttpRequest: Include the request ID in outgoing HTTP requests. We could set X-Forwarded-For and X-Original-User-Agent maybe, if that's useful for throttling in Envoy; that's done via MwHttpRequest::setOriginalRequest.

OK, I was just following up on T274195#6813241. It sounds like there's nothing to be done here then, so I'm marking as invalid.

Yeah, sorry, I didn't realize it got included in MediaWiki requests by default.

And it seems like json_logging automatically uses it.