Page MenuHomePhabricator

WikiLambda OrchestratorRequest does not propagate request tracing headers
Closed, ResolvedPublic

Description

It's standard practice in MediaWiki to propagate the x-request-id header for any HTTP requests made as a result of handling a user query. (We've also added traceparent and tracestate since to be compliant with the W3C TraceContext Recommendation; see also T320559).

WikiLambda's OrchestratorRequest doesn't do this however -- it calls Guzzle and only includes a User-Agent header.

This affects our distributed tracing implementation, breaking the relationships there. It also means that you can't search in Logstash for the x-request-id from a user's request and find any associated logs from the wikifunctions service. They're recorded underneath a freshly-generated x-request-id instead.

Event Timeline

Change #1034117 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] OrchestratorRequest: Pass on HTTP request tracing headers

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

Change #1034117 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] OrchestratorRequest: Pass on HTTP request tracing headers

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