Page MenuHomePhabricator

Consider recording the times at which requests start/are received, and responses start/are received
Closed, ResolvedPublic

Description

Description

Contributors are complaining about WF performance. We can't currently perform bottleneck analysis on what is probably the most latency-prone aspect of the system: MW API requests. If we logged or otherwise recorded the send and receive times for requests and responses throughout the system (i.e., in the API, the orchestrator, and the evaluator), we could get a clearer understanding of these bottlenecks.

Ways to surface this information:

  • metadata map: this way is straightforward and doesn't require any special logic to align the data afterward, but it would potentially junk up the metadata map. This implementation path would be dependent on planned work to make the metadata map cover all nested events, not just the top-level function call.
  • logstash: this would be relatively easy to incorporate into all parts of the system. We would need to be careful to assign a unique ID to each function call, AND an additional secondary ID to all nested calls (e.g., the evaluator or re-entrant orchestrator calls).
  • performance instrument: similar to logstash but potentially more appropriate. It is not clear at the moment how hard it would be to incorporate metrics platform instruments into the backend services.

Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

  • discuss the aforesaid
  • make tasks as appropriate

Remove all the non-applicable tags from the "Tags" field, leave only the tags of the projects/repositories related to this task


Completion checklist

Event Timeline

Jdforrester-WMF moved this task from To Triage to Backlog on the Abstract Wikipedia team board.

Regarding the use of Metrics Platform instruments in our backend services, the relevant ticket (for the MP JavaScript library to be used in that way) is T318832, and it appears that much of the work has been done. As I learn more, I will add additional info here.

It's also important to note that our Metrics Platform partners make a distinction between analytics and performance metrics. For performance metrics they encourage the use of frameworks involving StatsD/Graphite/Prometheus, etc., rather than MP instruments. But here again, investigation is needed to determine how well supported these frameworks are in non- MediaWiki settings.

Jdforrester-WMF renamed this task from Consider Recording Request Start/Request Receipt/Response Start/Response Receipt Times to Consider recording the times at which requests start/are received, and responses start/are received.Nov 25 2024, 4:55 PM
Jdforrester-WMF closed this task as Resolved.
Jdforrester-WMF claimed this task.

We now do this, thanks to @ecarg.